summaryrefslogtreecommitdiff
path: root/docker-compose.yaml
diff options
context:
space:
mode:
authoriza <59828082+izadoesdev@users.noreply.github.com>2025-06-24 07:50:06 +0300
committerGitHub <noreply@github.com>2025-06-24 07:50:06 +0300
commit704f620c927f8cf9a8f0b9015b81aa7deec6ec21 (patch)
treed840d53fc5571a60636650c4b153322c9048efa1 /docker-compose.yaml
parent4260d4be08817393af96e7843ed828183137119f (diff)
parent40a0d87c44da7472f94bd0cb943763df55e67b61 (diff)
downloadopencut-704f620c927f8cf9a8f0b9015b81aa7deec6ec21.tar.gz
Merge pull request #31 from YaoSiQian/patch-1
Fix Docker stuff (with README guidance)
Diffstat (limited to 'docker-compose.yaml')
-rw-r--r--docker-compose.yaml41
1 files changed, 38 insertions, 3 deletions
diff --git a/docker-compose.yaml b/docker-compose.yaml
index c1c61a47..c654926a 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -18,7 +18,8 @@ services:
start_period: 10s
redis:
- image: redis
+ image: redis:7-alpine
+ restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
@@ -36,12 +37,46 @@ services:
SRH_MODE: env
SRH_TOKEN: example_token
SRH_CONNECTION_STRING: "redis://redis:6379"
+ depends_on:
+ redis:
+ condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget --spider -q http://127.0.0.1:80 || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
-
-volumes:
+ web:
+ build:
+ context: ./apps/web
+ dockerfile: ./apps/web/Dockerfile
+ restart: unless-stopped
+ ports:
+ - "3000:3000"
+ environment:
+ - NODE_ENV=production
+ - DATABASE_URL=postgresql://opencut:opencutthegoat@db:5432/opencut
+ - BETTER_AUTH_URL=http://localhost:3000
+ - BETTER_AUTH_SECRET=your-production-secret-key-here
+ - UPSTASH_REDIS_REST_URL=http://serverless-redis-http:80
+ - UPSTASH_REDIS_REST_TOKEN=example_token
+ - GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
+ - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
+ depends_on:
+ db:
+ condition: service_healthy
+ serverless-redis-http:
+ condition: service_healthy
+ healthcheck:
+ test: ["CMD-SHELL", "curl -f http://localhost:3000/api/health || exit 1"]
+ interval: 30s
+ timeout: 10s
+ retries: 5
+ start_period: 30s
+
+volumes:
postgres_data:
+
+networks:
+ default:
+ name: opencut-network