-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
61 lines (56 loc) · 1.26 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
version: '3.7'
services:
nginx:
image: nginx
depends_on:
- api_backend
# - frontend
volumes:
- ./nginx_conf:/etc/nginx/conf.d
- ./frontend/dist:/var/www/frontend
restart: always
ports:
- "80:80"
networks:
default:
internal:
api_backend:
build: ./backend/
depends_on:
- db
environment:
- DB_URL=db
- DB_USER=username
- DB_PWD=password
- DB_NAME=test2
- CACHE_URL=cache
- CACHE_PORT=6379
- CACHE_PWD=ru1aifozuba0y0u_xds3c
restart: always
networks:
internal:
db:
image: mariadb:10.4
restart: always
environment:
- MYSQL_ROOT_PASSWORD=some_secure_pwd
- MYSQL_USER=username
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=test2
volumes:
- .data/mysql:/var/lib/mysql
networks:
internal:
# This command is required to set important mariadb defaults
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --wait_timeout=28800, --log-warnings=0]
cache:
image: redis
restart: always
command: redis-server --requirepass ru1aifozuba0y0u_xds3c
networks:
internal:
# frontend:
networks:
default:
internal:
internal: true