-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (69 loc) · 1.62 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
version: "3.8"
services:
laravel-app:
build:
context: .
dockerfile: ./docker/laravel-app/Dockerfile
container_name: hapify-laravel-app
restart: always
env_file:
- .env
environment:
- DB_HOST=${MYSQL_HOST}
- DB_DATABASE=${MYSQL_DATABASE}
- DB_USERNAME=${MYSQL_USER}
- DB_PASSWORD=${MYSQL_PASSWORD}
networks:
- backend
volumes:
- ./src/laravel-app:/var/www
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
container_name: hapify-nginx
depends_on:
- laravel-app
restart: always
ports:
- "${MS_PORT_PUBLIC}:80"
networks:
- frontend
- backend
volumes:
- ./docker/nginx/configs/conf.d/default.conf:/etc/nginx/conf.d/default.conf
- ./src/laravel-app:/var/www
mysql:
image: mysql
container_name: hapify-mysql
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ${DATA_PATH_HOST}/mysql:/var/lib/mysql
- ./docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
restart: always
networks:
- backend
ports:
- "${MYSQL_EXT_PORT}:3306"
redis:
build:
context: .
dockerfile: ./docker/redis/Dockerfile
hostname: redis
container_name: hopify-redis
restart: always
volumes:
- ${DATA_PATH_HOST}/redis:/data
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
networks:
- backend
networks:
frontend:
driver: bridge
backend:
driver: bridge