-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.dv.yml
86 lines (81 loc) · 1.92 KB
/
compose.dv.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
75
76
77
78
79
80
81
82
83
84
85
86
services:
traefik:
restart: always
image: "traefik:latest"
command:
- --log.level=ERROR
- --providers.docker=true
- --entrypoints.web.address=:80
- --providers.docker.exposedbydefault=false
- --providers.docker.network=web
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- web
backend:
container_name: server
hostname: server
build:
context: .
dockerfile: docker/server/Dockerfile
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`localhost`) && PathPrefix(`/api`)"
- "traefik.http.services.backend-service.loadbalancer.server.port=8000"
- "traefik.http.routers.backend.service=backend-service"
- "traefik.http.routers.backend.entrypoints=web"
env_file:
- .env
depends_on:
- db
networks:
- web
- backend
expose:
- "8000"
volumes:
- templates:/server/templates
db:
image: postgres:16-alpine
env_file:
- .env
volumes:
- db-data:/var/lib/postgresql/data
networks:
- backend
client:
container_name: client
hostname: client
build:
context: .
dockerfile: docker/client/Dockerfile
args:
VITE_API_URL: "http://localhost:80"
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.rule=Host(`localhost`)"
- "traefik.http.services.client-service.loadbalancer.server.port=3000"
- "traefik.http.routers.client.service=client-service"
- "traefik.http.routers.client.entrypoints=web"
volumes:
- node_modules:/client/node_modules
depends_on:
- backend
networks:
- web
expose:
- "3000"
networks:
web:
external: true
driver: bridge
backend:
external: false
driver: bridge
volumes:
db-data:
node_modules:
templates: