-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
65 lines (61 loc) · 1.65 KB
/
docker-compose.yaml
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
services:
database:
container_name: auth-system-database
image: postgres:17-alpine
restart: always
profiles:
- dev
- prod
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: auth-system
ports:
- 2000:5432
networks:
- auth-system-network
volumes:
- database-data:/var/lib/postgresql/data # store data from postgresql in the volume
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql # init database with SQL files from local "database" folder
backend:
container_name: auth-system-backend
image: fredrikj31/auth-system-backend:latest
restart: always
profiles:
- prod
environment:
WEBSITE_BASE_URL: ${WEBSITE_BASE_URL}
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
PASSWORD_SALT: ${PASSWORD_SALT}
COOKIE_SECRET: ${COOKIE_SECRET}
DB_HOST: auth-system-database
DB_PORT: 5432 # Must be set to "5432", because the backend and database shares network
DB_NAME: auth-system
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
networks:
- auth-system-network
- cloudflared_tunnel
ports:
- 2001:3000
frontend:
container_name: auth-system-frontend
image: fredrikj31/auth-system-frontend:latest
restart: always
profiles:
- prod
environment:
MY_APP_API_BASE_URL: ${MY_APP_API_BASE_URL}
networks:
- cloudflared_tunnel
ports:
- 2002:80
networks:
auth-system-network:
driver: bridge
cloudflared_tunnel:
external: true
volumes:
database-data:
name: auth-system-database-data
driver: local