-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-beta.yml
112 lines (107 loc) · 2.71 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
name: infra-langate-beta
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
image: langate/backend-beta
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}
NGINX_PORT: ${EXTERNAL_NGINX_PORT}
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}
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
environment:
POSTGRES_USER: ${DB_SUPERUSER}
POSTGRES_PASSWORD: ${DB_SUPERPASS}
LANGATE_USERNAME: ${DB_USER}
LANGATE_PASSWORD: ${DB_PASS}
LANGATE_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
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
image: langate/frontend-beta
environment:
- VITE_API_URL=${PROTOCOL}://api.beta.${WEBSITE_HOST}
- 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: langate/nginx-beta
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
netcontrol:
build:
context: ./netcontrol
dockerfile: Dockerfile.dev
image: langate/netcontrol
cap_add:
- NET_ADMIN
volumes:
- ${VARIABLES_PATH}:/variables.json
network_mode: "host"
networks:
backend: