-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocker-compose.yml
66 lines (62 loc) · 1.68 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
version: "3.8"
services:
traefik:
image: "traefik:2.5.6"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
php-apache:
build:
context: .
depends_on:
- "traefik"
- "mysql"
volumes:
- "./www:/var/www/html/"
- "./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini"
labels:
- "traefik.enable=true"
- "traefik.http.routers.php-apache.rule=Host(`localhost`, `lvh.me`, `pmamp.lvh.me`, `127.0.0.1`)"
- "traefik.http.routers.php-apache.entrypoints=web"
mysql:
image: "mysql:8.0.27"
# Uncomment line below if you are using a Mac with the M1 chip
#platform: linux/amd64
depends_on:
- "traefik"
volumes:
#- "./mysql_seed.sql:/docker-entrypoint-initdb.d/mysql_seed.sql"
- "./dbdata:/var/lib/mysql"
command:
- "--default-authentication-plugin=mysql_native_password"
environment:
MYSQL_ROOT_PASSWORD: "rootPASS"
MYSQL_DATABASE: "dbase"
MYSQL_USER: "dbuser"
MYSQL_PASSWORD: "dbpass"
labels:
- "traefik.enable=false"
phpmyadmin:
image: "phpmyadmin/phpmyadmin"
depends_on:
- "mysql"
links:
- "mysql"
environment:
PMA_HOST: "mysql"
PMA_PORT: "3306"
UPLOAD_LIMIT: "256M"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`pma.localhost`, `pma.lvh.me`)"
- "traefik.http.routers.whoami.entrypoints=web"
networks:
default:
name: "traefikNetwork"