-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
47 lines (43 loc) · 960 Bytes
/
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
---
version: "3.8"
services:
database:
image: mysql:8.3.0
env_file:
- .env
volumes:
- ./database:/docker-entrypoint-initdb.d
- db:/var/lib/mysql
backend:
image: backend
build: ./backend
depends_on:
- database
env_file:
- .env
volumes:
- ./backend/logs:/backend/logs
frontend:
image: frontend
build: ./frontend
depends_on:
- backend
env_file:
- .env
reverse-proxy:
image: nginx:latest
command: >
/bin/sh -c "
envsubst '$${FRONTEND_CONTAINER_PORT} $${BACKEND_CONTAINER_PORT} $${NGINX_CONTAINER_PORT} $${DOMAIN}' < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/conf.d/default.conf &&
nginx -g 'daemon off;'"
depends_on:
- frontend
- backend
env_file:
- .env
ports:
- "${NGINX_HOST_PORT}:${NGINX_CONTAINER_PORT}"
volumes:
- ./reverse-proxy:/etc/nginx/conf.d/
volumes:
db: