-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (67 loc) · 1.78 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
version: '3'
services:
reverse-proxy:
image: traefik:v2.10.7
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
networks:
- traefik_webgateway
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
fotd-front:
container_name: 'fotd-front'
build:
context: ./front
depends_on: [reverse-proxy]
networks:
- traefik_webgateway
ports:
- "3000:80"
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.fotd-front.rule=Host(`fotd.localhost`)'
- "traefik.http.routers.fotd-front.entrypoints=web"
- 'traefik.http.services.fotd-front.loadbalancer.server.port=80'
- "traefik.docker.network=traefik_webgateway"
fotd-api:
container_name: 'fotd-api'
build:
context: ./back
depends_on: [reverse-proxy]
networks:
- traefik_webgateway
- database
ports:
- "8082:8082"
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.fotd-api.rule=Host(`fotd.localhost`) && PathPrefix(`/api`)'
- "traefik.http.routers.fotd-api.entrypoints=web"
- 'traefik.http.services.fotd-api.loadbalancer.server.port=8082'
- "traefik.docker.network=traefik_webgateway"
fotd-db:
image: mariadb:11.3.2
container_name: fotd-db
volumes:
- "./volumes/db:/var/lib/mysql"
- "./database/:/docker-entrypoint-initdb.d/"
environment:
MYSQL_DATABASE: fotd
MYSQL_USER: fotd
MYSQL_PASSWORD: fotd
MYSQL_ROOT_PASSWORD: fotd
networks:
- database
ports:
- "3306:3306"
networks:
traefik_webgateway:
external: true
database: