-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-beta.yml
131 lines (125 loc) · 3.38 KB
/
docker-compose-beta.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: infra-insalanfr-beta
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
image: insalan/backend-beta
restart: unless-stopped
environment:
WEBSITE_HOST: beta.${WEBSITE_HOST}
HTTP_PROTOCOL: ${PROTOCOL}
DB_HOST: db
DB_PORT: 5432
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
MONGODB_USER: ${MONGODB_USER}
MONGODB_PASS: ${MONGODB_PASS}
NGINX_PORT: ${EXTERNAL_NGINX_PORT}
MAIL_AUTH: ${MAIL_AUTH}
STATIC_ROOT: ${BACKEND_STATIC_ROOT}
MEDIA_ROOT: ${BACKEND_MEDIA_ROOT}
SUPERUSER_USER: ${SUPERUSER_USER}
SUPERUSER_PASS: ${SUPERUSER_PASS}
DJANGO_SECRET: ${BACKEND_DJANGO_SECRET}
SESSION_COOKIE_AGE: ${SESSION_COOKIE_AGE}
HELLOASSO_HOSTNAME: ${HELLOASSO_HOSTNAME}
HELLOASSO_ORGANIZATION_SLUG: ${HELLOASSO_ORG_SLUG}
HELLOASSO_CLIENT_ID: ${HELLOASSO_CLIENT_ID}
HELLOASSO_CLIENT_SECRET: ${HELLOASSO_CLIENT_SECRET}
HELLOASSO_BACK_URL: ${HELLOASSO_BACK_URL}
HELLOASSO_RETURN_URL: ${HELLOASSO_RETURN_URL}
HELLOASSO_ERROR_URL: ${HELLOASSO_ERROR_URL}
RIOT_API_KEY: ${RIOT_API_KEY}
DEV: ${DEV}
volumes:
- ./volumes/beta/backend:/app/v1
- ./backend:/app
expose:
- 8000
networks:
- backend
links:
- db
depends_on:
db:
condition: service_healthy
db:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_SUPERUSER}
POSTGRES_PASSWORD: ${DB_SUPERPASS}
INSALAN_USERNAME: ${DB_USER}
INSALAN_PASSWORD: ${DB_PASS}
INSALAN_DATABASE: ${DB_NAME}
TZ: Europe/Paris
PGTZ: Europe/Paris
volumes:
- ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
- ./volumes/beta/postgres/data:/var/lib/postgresql/data
expose:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 1s
timeout: 5s
retries: 10
networks:
- backend
mongo-db:
image: mongo
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${DB_SUPERUSER}
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASS}
expose:
- 5433
networks:
- backend
command:
- '--logpath'
- '/dev/null'
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
image: insalan/frontend-beta
restart: unless-stopped
environment:
- VITE_API_URL=${PROTOCOL}://api.beta.${WEBSITE_HOST}/v${API_VERSION}
- NODE_ENV=${FRONTEND_NODE_ENV}
- VITE_WEBSITE_HOST=beta.${WEBSITE_HOST}
- VITE_SESSION_COOKIE_AGE=${SESSION_COOKIE_AGE}
volumes:
- ./frontend:/src
expose:
- "5173"
networks:
- backend
nginx:
build:
context: ./nginx
dockerfile: Dockerfile.dev
image: insalan/nginx-beta
restart: unless-stopped
environment:
- NGINX_HOST=beta.${WEBSITE_HOST}
- NGINX_PORT=80
- STATIC_ROOT=${BACKEND_STATIC_ROOT}
- MEDIA_ROOT=${BACKEND_MEDIA_ROOT}
ports:
- "${PREPROD_NGINX_PORT}:80"
volumes:
- ./volumes/beta/backend:/usr/share/nginx/html:ro
- ./nginx/templates/beta:/etc/nginx/templates:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./volumes/beta/nginx/logs:/var/log/nginx
networks:
- backend
depends_on:
- backend
- frontend
networks:
backend: