-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (88 loc) · 1.84 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
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
version: "3.9"
services:
redis:
image: redis:6-alpine
build:
context: "docker/redis"
dockerfile: "Dockerfile"
volumes:
- redis_volume:/data
ports:
- ${REDIS_PORT}:6379
networks:
- backend
mysql:
build:
context: "docker/mysql"
dockerfile: "Dockerfile"
args:
- MYSQL_VERSION=${MYSQL_VERSION}
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_DATABASE=${MYSQL_DB_NAME}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=${WORKSPACE_TIMEZONE}
ports:
- '${MYSQL_PORT}:3306'
expose:
- '${MYSQL_PORT}'
volumes:
- mysql_volume:/var/lib/mysql
networks:
- backend
adonis_app:
container_name: adonis_app
restart: always
depends_on:
- mysql
- redis
build:
context: .
dockerfile: Dockerfile
target: dependencies
ports:
- ${PORT}:${PORT}
- "9229:9229"
env_file:
- .env
environment:
- MYSQL_HOST=mysql
- REDIS_HOST=redis
volumes:
- ./:/home/node/app
command: dumb-init node ace serve --watch --node-args="--inspect=0.0.0.0"
networks:
- frontend
- backend
nginx:
image: nginx:1.23-alpine
build:
context: 'docker/nginx'
dockerfile: Dockerfile
args:
- NGINX_HOST_HTTP_PORT=${NGINX_HOST_HTTP_PORT}
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
volumes:
- nginx_volume:/etc/nginx
restart: always
depends_on:
- adonis_app
networks:
- frontend
- backend
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
nginx_volume:
driver: local
mysql_volume:
driver: local
redis_volume:
driver: local