This repository was archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (76 loc) · 1.62 KB
/
docker-compose.yml
File metadata and controls
77 lines (76 loc) · 1.62 KB
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
version: '3.7'
services:
frontend:
build:
context: .
dockerfile: Dockerfile
target: frontend
# args:
# SERVER_PORT: 5001
restart: always
environment:
- BACKEND_URL=http://backend
- DB_HOST=mariadb
ports:
- 80:80
depends_on:
- backend
volumes:
- ./data:/app/data
- ./frontend:/app # for live reloading code
secrets:
- db_name
- db_user
- db_password
networks:
- zcekni_auto_internal
backend:
build:
context: .
dockerfile: Dockerfile
target: backend
volumes:
- ./backend:/app # for live-reloading code
ports:
- 5001:80
depends_on:
- mariadb
networks:
- zcekni_auto_internal
mariadb:
image: mariadb
restart: on-failure
ports:
- 3306:3306 # for debugging connection from host
container_name: maria_sql_database
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
- MYSQL_DATABASE_FILE=/run/secrets/db_name
- MYSQL_USER_FILE=/run/secrets/db_user
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
volumes:
- db-data:/var/lib/mysql
secrets:
- db_root_password
- db_name
- db_user
- db_password
networks:
- zcekni_auto_internal
secrets:
db_root_password:
file: ./secrets/db_root_password
db_name:
file: ./secrets/db_name
db_user:
file: ./secrets/db_user
db_password:
file: ./secrets/db_password
redis_password:
file: ./secrets/redis_password
networks:
zcekni_auto_internal:
driver: bridge
volumes:
db-data:
driver: local