-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (67 loc) · 1.88 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
version: '3.3'
services:
proxy:
image: traefik:v2.6
# Enables the web UI and tells Traefik to listen to docker
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--api.dashboard"
- "--api.insecure" # Don't do that in production
- "--providers.docker"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
ports:
# The HTTP port
- "80:80"
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
db:
image: mariadb:10.7
restart: always
environment:
MARIADB_ROOT_PASSWORD: root
MYSQL_USER: user
MYSQL_PASSWORD: user
volumes:
- ./infra:/docker-entrypoint-initdb.d
ports:
- '13307:3306'
php81:
build:
dockerfile: ./infra/php/Dockerfile
context: .
args:
- PHP=8.1
depends_on:
- db
labels:
- traefik.enable=true
- traefik.port=433
- traefik.http.routers.php81.rule=Host(`test-projekt.app`)
- traefik.http.routers.php81.entrypoints=websecure
- traefik.http.routers.php81.tls=true
volumes:
- ./test-projekt:/var/www/test-projekt/
- ./infra/sites-enabled:/etc/apache2/sites-enabled/
php74:
build:
dockerfile: ./infra/php/Dockerfile
context: .
args:
- PHP=7.4
depends_on:
- db
labels:
- traefik.enable=true
- traefik.port=433
- traefik.http.routers.php74.rule=Host(`test-projekt2.app`)
- traefik.http.routers.php74.entrypoints=websecure
- traefik.http.routers.php74.tls=true
volumes:
- ./test-projekt2:/var/www/test-projekt2/
- ./infra/sites-enabled:/etc/apache2/sites-enabled/