This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
76 lines (72 loc) · 2.19 KB
/
compose.yaml
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
75
76
services:
client:
build:
context: ./client
target: dev
# target: prod
restart: always
volumes:
- ./client:/work
- /work/node_modules
labels:
"traefik.http.routers.client.rule": Host(`dev.local.trapti.tech`)
"traefik.http.routers.client.middlewares": tfa@docker
"traefik.http.routers.client.service": client
"traefik.http.services.client.loadbalancer.server.port": "5173" # target: dev
# "traefik.http.services.client.loadbalancer.server.port": "80" # target: prod
server:
build: ./server
restart: always
environment:
PORT: "8080"
MARIADB_HOSTNAME: mysql
MARIADB_PORT: "3306"
MARIADB_USER: root
MARIADB_PASSWORD: password
MARIADB_DATABASE: dev
labels:
"traefik.http.routers.server.rule": Host(`dev.local.trapti.tech`) && PathPrefix(`/api`)
"traefik.http.routers.server.middlewares": tfa@docker
"traefik.http.routers.server.service": server
"traefik.http.services.server.loadbalancer.server.port": "8080"
depends_on:
mysql:
condition: service_healthy
mysql:
image: mariadb:11
restart: always
environment:
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE: dev
ports:
- 3306:3306
volumes:
- ./data/mysql:/var/lib/mysql
healthcheck:
test: mariadb --user=root --password=password --execute "SHOW DATABASES;"
interval: 1s
timeout: 10s
retries: 60
auth:
image: ghcr.io/traptitech/traefik-forward-auth:3.2.1
restart: always
command:
- -config=/config.yaml
volumes:
- ./dev/traefik-forward-auth.yaml:/config.yaml:ro
labels:
"traefik.http.routers.tfa.rule": Host(`auth.local.trapti.tech`)
"traefik.http.routers.tfa.service": tfa
"traefik.http.services.tfa.loadbalancer.server.port": "4181"
traefik:
image: traefik:3.0
restart: always
command:
- --providers.docker=true
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
"traefik.http.middlewares.tfa.forwardauth.address": http://auth:4181/
"traefik.http.middlewares.tfa.forwardauth.authResponseHeaders": X-Forwarded-User