-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (66 loc) · 2.02 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
services:
nginx:
build: .docker/nginx
depends_on:
- php-fpm
volumes:
- .:/app
- ./.docker/nginx/vhost:/etc/nginx/conf.d
ports:
- '${NGINX_HTTP_PORT:-}:80'
- '${NGINX_HTTPS_PORT:-}:443'
networks:
- web
- default
labels:
- traefik.enable=true
- traefik.http.routers.web-http-${COMPOSE_PROJECT_NAME}.rule=Host(`${APP_HOST:-test-app.loc}`)
- traefik.http.routers.web-http-${COMPOSE_PROJECT_NAME}.middlewares=web-http-${COMPOSE_PROJECT_NAME}
- traefik.http.routers.web-https-${COMPOSE_PROJECT_NAME}.rule=Host(`${APP_HOST:-test-app.loc}`)
- traefik.http.routers.web-https-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.middlewares.web-http-${COMPOSE_PROJECT_NAME}.redirectscheme.scheme=https
- traefik.http.middlewares.web-http-${COMPOSE_PROJECT_NAME}.redirectscheme.permanent=true
php-fpm:
build: .docker/php-fpm
depends_on:
- mariadb
volumes:
- .:/app
- ./.docker/php-fpm/php.ini:/usr/local/etc/php/php.ini
labels:
traefik.enable: "false"
ofelia.enabled: "true"
ofelia.job-exec.php-cli.schedule: "@every 1m"
ofelia.job-exec.php-cli.user: www-data
ofelia.job-exec.php-cli.command: "php /app/bin/console schedule:run"
mariadb:
image: 'mariadb:11'
ports:
- '${FORWARD_DB_PORT:-}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD:-rootpassword}'
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: '${DB_DATABASE:-dbname}'
MYSQL_USER: '${DB_USERNAME:-dbuser}'
MYSQL_PASSWORD: '${DB_PASSWORD:-password}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- './.docker/mariadb/data:/var/lib/mysql'
networks:
- web
- default
labels:
- traefik.enable=false
ofelia:
image: mcuadros/ofelia:latest
depends_on:
- php-fpm
command: daemon --docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- traefik.enable=false
networks:
web:
name: traefik_default
external: true