-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
71 lines (65 loc) · 1.47 KB
/
docker-compose.prod.yml
File metadata and controls
71 lines (65 loc) · 1.47 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
# Stop and remove containers
# docker compose -f docker-compose.prod.yml down
# Build and start
# docker compose -f docker-compose.prod.yml up -d --build
services:
redis:
image: redis:alpine
container_name: reviewscope-redis
restart: always
volumes:
- redis_data:/data
# Internal port 6379 is available to other services on the 'app-network'
api:
build:
context: .
dockerfile: Dockerfile
target: api
container_name: reviewscope-api
restart: always
ports:
- "3001:3000" # Map host 3001 to container 3000
env_file:
- ./.env
environment:
- NODE_ENV=production
- PORT=3000
- REDIS_URL=redis://redis:6379
depends_on:
- redis
worker:
build:
context: .
dockerfile: Dockerfile
target: worker
container_name: reviewscope-worker
restart: always
env_file:
- ./.env
environment:
- NODE_ENV=production
- REDIS_URL=redis://redis:6379
depends_on:
- redis
dashboard:
build:
context: .
dockerfile: Dockerfile
target: dashboard
container_name: reviewscope-dashboard
restart: always
ports:
- "3000:3000"
env_file:
- ./.env
environment:
- NODE_ENV=production
- PORT=3000
- REDIS_URL=redis://redis:6379
- INTERNAL_API_URL=http://api:3000
- NEXT_PUBLIC_NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
depends_on:
- redis
- api
volumes:
redis_data: