-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
86 lines (77 loc) · 1.96 KB
/
docker-compose.yml
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
services:
coop_casa_proxy:
build: ./proxy
restart: always
networks:
- frontend
- backend
- webnet
environment:
INTERNAL_FRONTEND_PORT: ${INTERNAL_FRONTEND_PORT}
INTERNAL_BACKEND_PORT: ${INTERNAL_BACKEND_PORT}
depends_on:
- psql_db
- backend
- frontend
psql_db:
image: postgres:latest
restart: always
environment:
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
networks:
- backend
volumes:
- psql_volume:/var/lib/postgresql/data # external : internal
healthcheck:
test: ["CMD-SHELL", "PGPASSWORD=${DB_PASSWORD} psql -h localhost -U ${DB_USERNAME} -d ${DB_DATABASE} -c 'SELECT 1'"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: ./backend
restart: always
depends_on:
- psql_db
networks:
- backend
environment:
INTERNAL_BACKEND_PORT: ${INTERNAL_BACKEND_PORT}
EXTERNAL_FRONTEND_PORT: ${EXTERNAL_FRONTEND_PORT}
IS_PROD: ${IS_PROD}
PROD_HOST: ${PROD_HOST}
ADMIN_USER_ID: ${ADMIN_USER_ID}
JWT_SIGN_SECRET: ${JWT_SIGN_SECRET}
AUTH_KEY_SECRET: ${AUTH_KEY_SECRET}
DB_ENCRYPT_KEY_SECRET: ${DB_ENCRYPT_KEY_SECRET}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
frontend:
build:
context: ./frontend
args:
VITE_IS_PROD: ${VITE_IS_PROD}
VITE_API_PROD_HOST: ${VITE_API_PROD_HOST}
VITE_API_PORT: ${VITE_API_PORT}
restart: always
depends_on:
- backend
networks:
- frontend
volumes:
psql_volume:
networks:
frontend:
name: coop_casa_frontend_nw
driver: bridge
backend:
name: coop_casa_backend_nw
driver: bridge
webnet:
external: true