-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (94 loc) · 2.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
101 lines (94 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: '3.8'
services:
db:
image: postgres:15
container_name: autoshorts_db
environment:
POSTGRES_DB: autoshorts
POSTGRES_USER: autoshorts
POSTGRES_PASSWORD: password
volumes:
- db_data:/var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- autoshorts_net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U autoshorts"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: autoshorts_redis
ports:
- '6379:6379'
networks:
- autoshorts_net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
app:
build:
context: .
dockerfile: docker/Dockerfile.app
container_name: autoshorts_app
environment:
- PORT=3000
- DATABASE_URL=postgres://autoshorts:password@db:5432/autoshorts
- REDIS_URL=redis://redis:6379
- JWT_SECRET=${JWT_SECRET:-change_this}
- MASTER_KEY=${MASTER_KEY}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- OAUTH_REDIRECT_URI=${OAUTH_REDIRECT_URI:-http://localhost:3000/api/auth/youtube/callback}
- GOOGLE_OAUTH_REDIRECT_URI=${GOOGLE_OAUTH_REDIRECT_URI:-http://localhost:3000/api/auth/google/callback}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:3000}
- NEXT_PUBLIC_FRONTEND_URL=${FRONTEND_URL:-http://localhost:3000}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
- PAYPAL_CLIENT_ID=${PAYPAL_CLIENT_ID}
- PAYPAL_CLIENT_SECRET=${PAYPAL_CLIENT_SECRET}
- PAYPAL_MODE=${PAYPAL_MODE:-sandbox}
- NODE_ENV=${NODE_ENV:-production}
ports:
- '3000:3000'
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- autoshorts_net
volumes:
- ./tmp:/tmp/autoshorts
- ./scripts:/app/scripts
restart: unless-stopped
worker:
build:
context: .
dockerfile: docker/Dockerfile.worker
container_name: autoshorts_worker
environment:
- DATABASE_URL=postgres://autoshorts:password@db:5432/autoshorts
- REDIS_URL=redis://redis:6379
- MASTER_KEY=${MASTER_KEY}
- NODE_ENV=${NODE_ENV:-production}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- autoshorts_net
volumes:
- ./tmp:/tmp/autoshorts
restart: unless-stopped
volumes:
db_data:
driver: local
networks:
autoshorts_net:
driver: bridge