-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·74 lines (72 loc) · 3.38 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
version: '3.8'
services:
# ---------------------------------------------------------------------------- #
# Traefik #
# ---------------------------------------------------------------------------- #
proxy:
container_name: 'proxy'
image: 'traefik:v2.9.6'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
command:
- '--api.insecure=true'
- '--providers.docker=true'
- '--log.level=DEBUG'
- '--providers.docker.exposedbydefault=false'
- '--entrypoints.web.address=:80'
ports:
- '80:80'
- '443:443'
- '8080:8080'
restart: unless-stopped
# ---------------------------------------------------------------------------- #
# Java #
# ---------------------------------------------------------------------------- #
backend:
container_name: 'backend'
image: 'eclipse-temurin:17-jdk-jammy'
volumes:
- './backend:/var/www/html'
command: 'tail -f /dev/null'
restart: unless-stopped
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.backend.entrypoints=web'
- 'traefik.http.routers.backend.rule=Host(`backend.local`)'
- 'traefik.http.routers.backend.service=backend'
- 'traefik.http.services.backend.loadbalancer.server.port=8081'
- 'traefik.http.routers.frontend-api.entrypoints=web'
- 'traefik.http.routers.frontend-api.rule=Host(`frontend.local`) && (PathPrefix(`/api`) || PathPrefix(`/websocket`))'
- 'traefik.http.routers.frontend-api.service=frontend-api'
- 'traefik.http.services.frontend-api.loadbalancer.server.port=8081'
# ---------------------------------------------------------------------------- #
# Frontend #
# ---------------------------------------------------------------------------- #
frontend:
container_name: 'frontend'
image: 'dev-build/frontend-java'
build:
context: './frontend'
dockerfile: Dockerfile
volumes:
- './frontend:/var/www/html'
restart: unless-stopped
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.frontend.entrypoints=web'
- 'traefik.http.routers.frontend.rule=Host(`frontend.local`)'
- 'traefik.http.routers.frontend.service=frontend'
- 'traefik.http.services.frontend.loadbalancer.server.port=3000'
# ---------------------------------------------------------------------------- #
# Mailcatcher #
# ---------------------------------------------------------------------------- #
mailcatcher:
container_name: 'mailcatcher'
image: 'dockage/mailcatcher:0.9.0'
restart: unless-stopped
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.mailcatcher.entrypoints=web'
- 'traefik.http.routers.mailcatcher.rule=Host(`mailcatcher.local`)'
- 'traefik.http.routers.mailcatcher.service=mailcatcher'
- 'traefik.http.services.mailcatcher.loadbalancer.server.port=1080'