-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (56 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
58 lines (56 loc) · 1.38 KB
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
version: '3'
services:
reverse-proxy:
image: traefik:v2.11
command:
- --api.insecure=true
- --providers.docker
- --entrypoints.http.address=:80
- --entrypoints.mysql.address=:3306
- --providers.docker.exposedbydefault=true
ports:
- "80:80"
- "8080:8080"
- "3306:3306"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
db:
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: test_password
MYSQL_DATABASE: course_catalog
MYSQL_USER: test_user
MYSQL_PASSWORD: test_password
volumes:
- ./database/volume:/var/lib/mysql
hostname: database.cc.localhost
labels:
- traefik.tcp.routers.mysql.entrypoints=mysql
- traefik.tcp.routers.mysql.rule=HostSNI(`*`)
- traefik.tcp.services.mysql.loadbalancer.server.port=3306
ports:
- 8001:3306
api:
build : .
container_name: api
depends_on:
- db
volumes:
- ./api/:/var/www/html/
stdin_open: true
tty: true
hostname: api.cc.localhost
labels:
- traefik.http.routers.api.rule=Host(`api.cc.localhost`)
front:
image: php:8.3-apache
container_name: front
depends_on:
- api
volumes:
- ./front_end/:/var/www/html/
stdin_open: true
tty: true
hostname: api.cc.localhost
labels:
- traefik.http.routers.front.rule=Host(`cc.localhost`)