-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (81 loc) · 3.04 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
77
78
79
80
81
82
83
84
85
86
87
88
# This Docker Compose file should only be used for your development environment!
version: '3.5'
services:
traefik:
image: traefik:2.9
command:
- --providers.docker
- --providers.docker.exposedByDefault=false
- --api.dashboard=true
- --api.insecure=true
labels:
- traefik.enable=true
- traefik.http.routers.traefik_dashboard_router.rule=Host(`traefik.$DOMAIN`)
- traefik.http.routers.traefik_dashboard_router.service=traefik_dashboard_service
- traefik.http.services.traefik_dashboard_service.loadbalancer.server.port=8080
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
app:
container_name: app
image: thecodingmachine/php:8.1-v4-apache-node16
labels:
- traefik.enable=true
- traefik.http.routers.app_router.rule=Host(`$DOMAIN`,`$DOMAINB`)
environment:
APACHE_DOCUMENT_ROOT: "public/"
PHP_EXTENSION_XDEBUG: "1"
PHP_EXTENSION_REDIS: "1"
PHP_EXTENSION_INTL: "1"
PHP_EXTENSION_GD: "1"
PHP_EXTENSION_APCU: "1"
PHP_EXTENSION_ZIP: "1"
PHP_INI_MEMORY_LIMIT: "2G"
PHP_INI_XDEBUG__MODE: "${XDEBUG_MODE:-debug}"
PHP_INI_UPLOAD_MAX_FILESIZE: "100M"
PHP_INI_POST_MAX_SIZE: "128M"
APP_NAME: "$APP_NAME"
APP_ENV: "${APP_ENV:-dev}"
APP_DEBUG: "1"
APP_SECRET: "$APP_SECRET"
MONOLOG_LOGGING_PATH: "php://stderr"
DATABASE_URL: "$DATABASE_URL"
MAILER_DSN: "$MAILER_DSN"
MAIL_FROM: "$MAIL_FROM"
volumes:
- .:/var/www/html
# For business data.
mysql:
image: mariadb:10.3.34
command: [ '--default-authentication-plugin=mysql_native_password', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci' ]
environment:
MYSQL_ROOT_PASSWORD: "$MYSQL_ROOT_PASSWORD"
MYSQL_DATABASE: "$MYSQL_DATABASE"
MYSQL_USER: "$MYSQL_USER"
MYSQL_PASSWORD: "$MYSQL_PASSWORD"
volumes:
- mysql_data:/var/lib/mysql
ports:
- "3307:3306"
# For catching and displaying emails.
mailhog:
image: mailhog/mailhog:latest
labels:
- traefik.enable=true
- traefik.http.routers.mailhog_router.rule=Host(`mailhog.$DOMAIN`)
- traefik.http.routers.mailhog_router.service=mailhog_service
- traefik.http.services.mailhog_service.loadbalancer.server.port=8025
phpmyadmin:
image: phpmyadmin/phpmyadmin:5.0
labels:
- traefik.enable=true
- traefik.http.routers.phpmyadmin_router.rule=Host(`phpmyadmin.$DOMAIN`)
environment:
PMA_HOSTS: "mysql"
PMA_USER: "root"
PMA_PASSWORD: "$MYSQL_ROOT_PASSWORD"
UPLOAD_LIMIT: 300M
volumes:
mysql_data:
driver: local