-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (75 loc) · 2.34 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
68
69
70
71
72
73
74
75
76
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-https-${COMPOSE_PROJECT_NAME}.rule=Host(`${APP_HOST:-test-app.loc}`)
- traefik.http.routers.web-https-${COMPOSE_PROJECT_NAME}.tls=true
php-fpm:
build: .docker/php-fpm
depends_on:
- mariadb
- redis
environment:
- CURRENT_UID=${CURRENT_UID:-1000}
- CURRENT_GID=${CURRENT_GID:-1000}
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/artisan schedule:run"
mariadb:
image: 'mariadb:11'
ports:
- '${FORWARD_DB_PORT:-}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD:-secret}'
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: '${DB_DATABASE:-laravel}'
MYSQL_USER: '${DB_USERNAME:-laravel}'
MYSQL_PASSWORD: '${DB_PASSWORD:-secret}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- './.docker/mariadb/data:/var/lib/mysql'
networks:
- web
- default
labels:
- traefik.enable=false
redis:
build: .docker/redis
volumes:
- ./.docker/redis/data:/data
ports:
- '${REDIS_PORT:-}:6379'
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