-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (60 loc) · 1.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
version: "3.9"
services:
postgres:
image: postgres:15
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: nodrive
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/postgresql/data
traefik:
image: traefik:v2.9
depends_on:
- client
command:
- "--api.insecure=true"
- "--providers.docker"
- "--entrypoints.web.address=:80"
labels:
- traefik.enable=true
- traefik.http.routers.api.rule=Host(`api.localhost`)
- traefik.http.routers.api.service=api-vreal
- traefik.http.routers.api.entrypoints=web
- traefik.http.routers.client.rule=Host(`localhost`)
- traefik.http.routers.client.service=client-vreal
- traefik.http.routers.client.entrypoints=web
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: unless-stopped
api:
restart: always
build:
dockerfile: Dockerfile
context: "./server"
depends_on:
- postgres
volumes:
- type: bind
source: ./server
target: /app
ports:
- "3001:3000"
client:
build:
dockerfile: Dockerfile
context: "./client"
depends_on:
- api
volumes:
- type: bind
source: ./client
target: /app
ports:
- "3000:5173"