forked from letsgetrusty/live-bootcamp-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
40 lines (39 loc) · 1.27 KB
/
compose.yml
File metadata and controls
40 lines (39 loc) · 1.27 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
services:
app-service:
image: devsprint/app-service # specify name of image on Docker Hub
restart: "always" # automatically restart container when server crashes
environment: # set up environment variables
AUTH_SERVICE_IP: ${AUTH_SERVICE_IP:-localhost} # Use localhost as the default value
ports:
- "8000:8000" # expose port 8000 so that applications outside the container can connect to it
depends_on: # only run app-service after auth-service has started
auth-service:
condition: service_started
auth-service:
image: devsprint/auth-service
restart: "always" # automatically restart container when server crashes
environment:
JWT_SECRET: ${JWT_SECRET}
DATABASE_URL: "postgres://postgres:${POSTGRES_PASSWORD}@db:5432"
POSTMARK_AUTH_TOKEN: ${POSTMARK_AUTH_TOKEN}
ports:
- "3000:3000" # expose port 3000 so that applications outside the container can connect to it
depends_on:
- db
db:
image: postgres:15.2-alpine
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
redis:
image: redis:7.0-alpine
restart: always
ports:
- "6379:6379"
volumes:
db:
driver: local