-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (62 loc) · 1.37 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
version: '3.8'
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
db-data:
driver: local
services:
nginx:
image: nginx:1.18.0-alpine
container_name: nginx
ports:
- 80:80
volumes:
- ./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./:/var/www/html
networks:
- frontend
- backend
app:
build: ./.docker/php-fpm
container_name: app
volumes:
- ./:/var/www/html
networks:
- backend
# db:
# image: mysql:5.7
# command:
# - --sql-mode=NO_ENGINE_SUBSTITUTION
# container_name: db
# ports:
# - 5000:3306
# environment:
# - MYSQL_DATABASE=cake-blog-tutorial
# - MYSQL_USER=mysql
# - MYSQL_PASSWORD=password
# - MYSQL_ROOT_PASSWORD=password
# volumes:
# - ./.docker/mysql/etc-mysql.cnf:/etc/mysql/conf.d/etc-mysql.cnf
# - ./.docker/mysql/init:/docker-entrypoint-initdb.d
# - db-data:/var/lib/mysql
# networks:
# - backend
db:
image: postgres:11.7
container_name: db
ports:
- 5000:5432
volumes:
- ./.docker/postgres/init:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_INITDB_ARGS: "--encoding=UTF-8"
hostname: postgres
restart: always
user: root
networks:
- backend