-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.57 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
version: '3'
services:
mysql:
build:
context: ./mysql
restart: always
environment:
- MYSQL_DATABASE=${MY_DB_NAME}
- MYSQL_USER=${MY_DB_USER}
- MYSQL_PASSWORD=${MY_DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MY_DB_ROOT_PASSWORD}
ports:
- "3306:3306"
volumes:
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./mysql/data:/var/lib/mysql
postgres:
build:
context: ./postgres
restart: always
environment:
- POSTGRES_DB=${PG_DB_NAME}
- POSTGRES_USER=${PG_DB_USER}
- POSTGRES_PASSWORD=${PG_DB_PASSWORD}
ports:
- "5432:5432"
volumes:
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgres/data/:/var/lib/postgresql/data/
php-fpm:
build:
context: ./php-fpm
restart: always
# environment:
# - APP_ENV=${APP_ENV}
# - APP_SECRET=${APP_SECRET}
# - DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@database:3306/${DATABASE_NAME}?serverVersion=5.7
volumes:
- ./src/:/var/www/
- ./php-fpm/conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
- ./php-fpm/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
composer:
image: composer
volumes:
- ./src/:/app/
command: install
nginx:
build:
context: ./nginx
restart: always
volumes:
- ./src/:/var/www/
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d/:/etc/nginx/conf.d/
- ./logs:/var/log
depends_on:
- php-fpm
- mysql
- postgres
ports:
- "80:80"