-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 1.12 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
services:
database:
image: mariadb:latest
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
ports:
- "3306:3306"
volumes:
- ./docker/database/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./docker/database/data:/var/lib/mysql
nginx:
build:
context: ./docker/nginx
ports:
- "8080:80"
- "443:443"
volumes:
- '.:/var/www/current/'
- './docker/nginx/nginx.conf:/etc/nginx/nginx.conf'
- './docker/nginx/sites/:/etc/nginx/sites-available'
- './docker/nginx/conf.d/:/etc/nginx/conf.d'
links:
- php
php:
build:
context: ./docker/php
depends_on:
- database
environment:
- APP_ENV=${APP_ENV}
- APP_SECRET=${APP_SECRET}
- DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@database:3306/${DATABASE_NAME}
volumes:
- '.:/var/www/current/'
working_dir: '/var/www/current'
volumes:
###> doctrine/doctrine-bundle ###
database_data:
###< doctrine/doctrine-bundle ###