-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (58 loc) · 1.91 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
version: '3'
services:
nginx:
image: ${REGISTRY}/${PROJECT}/nginx
build:
context: .
dockerfile: .docker/dockerfile-nginx
container_name: ${PROJECT}-nginx
environment:
- VIRTUAL_HOST=${PROJECT}.local
- TZ=${APP_TIMEZONE}
command: /bin/sh -c "chown -R 1000:1000 /app && envsubst '$$VIRTUAL_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: unless-stopped
depends_on:
- php
- mysql
links:
- php
php:
container_name: ${PROJECT}-php
image: ${REGISTRY}/${PROJECT}/php
working_dir: '/app'
build:
context: .
dockerfile: .docker/dockerfile-php
args:
- PHP_VERSION=${PHP_VERSION}
- APP_ENV=${APP_ENV}
restart: unless-stopped
command: /bin/sh -c "crontab -u www-data /usr/crontab && /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf"
env_file: .env
environment:
TZ: ${APP_TIMEZONE}
DB_CONNECTION: mysql
DB_HOST: ${DB_HOST}
DB_PORT: 3306
DB_DATABASE: ${DB_DATABASE}
DB_PASSWORD: ${DB_PASSWORD}
DB_USERNAME: ${DB_USERNAME}
depends_on:
- mysql
links:
- mysql
mysql:
image: mysql:5.7
container_name: ${PROJECT}-mysql
restart: unless-stopped
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--innodb_use_native_aio=0']
environment:
- TZ=${APP_TIMEZONE}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
networks:
default:
external:
name: nginx-proxy