|
| 1 | +services: |
| 2 | + libsql: |
| 3 | + image: ghcr.io/tursodatabase/libsql-server:v0.24.33 |
| 4 | + restart: unless-stopped |
| 5 | + expose: |
| 6 | + - 8080 |
| 7 | + volumes: |
| 8 | + - libsql-data:/var/lib/sqld |
| 9 | + environment: |
| 10 | + - SQLD_NODE=primary |
| 11 | + # Increase limits to handle multiple services without connection pooling |
| 12 | + - SQLD_MAX_CONCURRENT_CONNECTIONS=512 |
| 13 | + - SQLD_MAX_CONCURRENT_REQUESTS=1024 |
| 14 | + healthcheck: |
| 15 | + test: |
| 16 | + [ |
| 17 | + "CMD-SHELL", |
| 18 | + 'perl -e ''use IO::Socket::INET; exit(IO::Socket::INET->new(PeerAddr=>"127.0.0.1:8080",Timeout=>1) ? 0 : 1);''', |
| 19 | + ] |
| 20 | + interval: 10s |
| 21 | + timeout: 5s |
| 22 | + retries: 5 |
| 23 | + start_period: 10s |
| 24 | + |
| 25 | + # One-shot migration runner (idempotent — drizzle skips applied migrations). |
| 26 | + # No published image exists for it upstream, so it is built from the pinned |
| 27 | + # commit the ghcr.io app images were built from. |
| 28 | + db-migrate: |
| 29 | + build: |
| 30 | + context: https://github.com/openstatusHQ/openstatus.git#e1a98255e39c9cc9f6d4853dbce30c3f6c42514a |
| 31 | + dockerfile: packages/db/Dockerfile |
| 32 | + restart: on-failure:3 |
| 33 | + environment: |
| 34 | + - DATABASE_URL=http://libsql:8080 |
| 35 | + - DATABASE_AUTH_TOKEN= |
| 36 | + depends_on: |
| 37 | + libsql: |
| 38 | + condition: service_healthy |
| 39 | + |
| 40 | + workflows: |
| 41 | + image: ghcr.io/openstatushq/openstatus-workflows:e1a9825 |
| 42 | + restart: unless-stopped |
| 43 | + expose: |
| 44 | + - 3000 |
| 45 | + volumes: |
| 46 | + - workflows-data:/app/data |
| 47 | + environment: |
| 48 | + - NODE_ENV=production |
| 49 | + - PORT=3000 |
| 50 | + - DATABASE_URL=http://libsql:8080 |
| 51 | + - DATABASE_AUTH_TOKEN= |
| 52 | + - CRON_SECRET=${CRON_SECRET} |
| 53 | + - RESEND_API_KEY=${RESEND_API_KEY:-re_selfhost_placeholder} |
| 54 | + - SITE_URL=https://${DASHBOARD_HOST} |
| 55 | + - TINYBIRD_NOOP=true |
| 56 | + depends_on: |
| 57 | + db-migrate: |
| 58 | + condition: service_completed_successfully |
| 59 | + libsql: |
| 60 | + condition: service_healthy |
| 61 | + healthcheck: |
| 62 | + test: ["CMD", "curl", "-f", "http://localhost:3000/ping"] |
| 63 | + interval: 15s |
| 64 | + timeout: 10s |
| 65 | + retries: 3 |
| 66 | + start_period: 30s |
| 67 | + |
| 68 | + server: |
| 69 | + image: ghcr.io/openstatushq/openstatus-server:e1a9825 |
| 70 | + restart: unless-stopped |
| 71 | + expose: |
| 72 | + - 3000 |
| 73 | + environment: |
| 74 | + - NODE_ENV=production |
| 75 | + - PORT=3000 |
| 76 | + - DATABASE_URL=http://libsql:8080 |
| 77 | + - DATABASE_AUTH_TOKEN= |
| 78 | + - CRON_SECRET=${CRON_SECRET} |
| 79 | + - RESEND_API_KEY=${RESEND_API_KEY:-re_selfhost_placeholder} |
| 80 | + - SUPER_ADMIN_TOKEN=${SUPER_ADMIN_TOKEN} |
| 81 | + - SELF_HOST=true |
| 82 | + - FLY_REGION=self-hosted |
| 83 | + - TINYBIRD_NOOP=true |
| 84 | + - UPSTASH_REDIS_REST_URL=http://localhost:6379 |
| 85 | + - UPSTASH_REDIS_REST_TOKEN=placeholder |
| 86 | + depends_on: |
| 87 | + db-migrate: |
| 88 | + condition: service_completed_successfully |
| 89 | + workflows: |
| 90 | + condition: service_healthy |
| 91 | + libsql: |
| 92 | + condition: service_healthy |
| 93 | + healthcheck: |
| 94 | + test: ["CMD", "curl", "-f", "http://localhost:3000/ping"] |
| 95 | + interval: 15s |
| 96 | + timeout: 10s |
| 97 | + retries: 3 |
| 98 | + start_period: 30s |
| 99 | + |
| 100 | + dashboard: |
| 101 | + image: ghcr.io/openstatushq/openstatus-dashboard:e1a9825 |
| 102 | + restart: unless-stopped |
| 103 | + expose: |
| 104 | + - 3000 |
| 105 | + environment: |
| 106 | + - NODE_ENV=production |
| 107 | + - PORT=3000 |
| 108 | + - HOSTNAME=0.0.0.0 |
| 109 | + - AUTH_TRUST_HOST=true |
| 110 | + - DATABASE_URL=http://libsql:8080 |
| 111 | + - DATABASE_AUTH_TOKEN= |
| 112 | + - AUTH_SECRET=${AUTH_SECRET} |
| 113 | + - SELF_HOST=true |
| 114 | + - NEXT_PUBLIC_URL=https://${DASHBOARD_HOST} |
| 115 | + - CRON_SECRET=${CRON_SECRET} |
| 116 | + - RESEND_API_KEY=${RESEND_API_KEY:-re_selfhost_placeholder} |
| 117 | + - TINYBIRD_NOOP=true |
| 118 | + - UPSTASH_REDIS_REST_URL=http://localhost:6379 |
| 119 | + - UPSTASH_REDIS_REST_TOKEN=placeholder |
| 120 | + depends_on: |
| 121 | + db-migrate: |
| 122 | + condition: service_completed_successfully |
| 123 | + workflows: |
| 124 | + condition: service_healthy |
| 125 | + libsql: |
| 126 | + condition: service_healthy |
| 127 | + server: |
| 128 | + condition: service_healthy |
| 129 | + healthcheck: |
| 130 | + test: ["CMD", "curl", "-f", "http://localhost:3000/"] |
| 131 | + interval: 15s |
| 132 | + timeout: 10s |
| 133 | + retries: 3 |
| 134 | + start_period: 45s |
| 135 | + |
| 136 | + status-page: |
| 137 | + image: ghcr.io/openstatushq/openstatus-status-page:e1a9825 |
| 138 | + restart: unless-stopped |
| 139 | + expose: |
| 140 | + - 3000 |
| 141 | + environment: |
| 142 | + - NODE_ENV=production |
| 143 | + - PORT=3000 |
| 144 | + - HOSTNAME=0.0.0.0 |
| 145 | + - AUTH_TRUST_HOST=true |
| 146 | + - DATABASE_URL=http://libsql:8080 |
| 147 | + - DATABASE_AUTH_TOKEN= |
| 148 | + - AUTH_SECRET=${AUTH_SECRET} |
| 149 | + - SELF_HOST=true |
| 150 | + - NEXT_PUBLIC_URL=https://${DASHBOARD_HOST} |
| 151 | + - CRON_SECRET=${CRON_SECRET} |
| 152 | + - RESEND_API_KEY=${RESEND_API_KEY:-re_selfhost_placeholder} |
| 153 | + - TINYBIRD_NOOP=true |
| 154 | + depends_on: |
| 155 | + db-migrate: |
| 156 | + condition: service_completed_successfully |
| 157 | + workflows: |
| 158 | + condition: service_healthy |
| 159 | + libsql: |
| 160 | + condition: service_healthy |
| 161 | + server: |
| 162 | + condition: service_healthy |
| 163 | + healthcheck: |
| 164 | + test: ["CMD", "curl", "-f", "http://localhost:3000/"] |
| 165 | + interval: 15s |
| 166 | + timeout: 10s |
| 167 | + retries: 3 |
| 168 | + start_period: 45s |
| 169 | + |
| 170 | + # Ingest server for private-location probes (the probe itself, |
| 171 | + # ghcr.io/openstatushq/private-location, runs wherever you monitor from). |
| 172 | + private-location: |
| 173 | + image: ghcr.io/openstatushq/openstatus-private-location:e1a9825 |
| 174 | + restart: unless-stopped |
| 175 | + expose: |
| 176 | + - 8080 |
| 177 | + environment: |
| 178 | + - PORT=8080 |
| 179 | + - GIN_MODE=release |
| 180 | + - DB_URL=http://libsql:8080 |
| 181 | + - WORKFLOWS_URL=http://workflows:3000 |
| 182 | + - CRON_SECRET=${CRON_SECRET} |
| 183 | + - TINYBIRD_URL=${TINYBIRD_URL} |
| 184 | + - TINYBIRD_TOKEN=${TINYBIRD_TOKEN} |
| 185 | + depends_on: |
| 186 | + server: |
| 187 | + condition: service_healthy |
| 188 | + healthcheck: |
| 189 | + test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/health"] |
| 190 | + interval: 15s |
| 191 | + timeout: 10s |
| 192 | + retries: 3 |
| 193 | + start_period: 30s |
| 194 | + |
| 195 | +volumes: |
| 196 | + libsql-data: |
| 197 | + workflows-data: |
0 commit comments