-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
66 lines (60 loc) · 1.71 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
services:
server:
container_name: matching-app-server
build:
context: ./server
dockerfile: ./Dockerfile.dev
ports:
- $API_HOST_PORT:$API_CONTAINER_PORT
depends_on:
- db
volumes:
- ./server:/app
env_file: ./.env
db:
container_name: matching-app-db
image: postgres:15
env_file: ./.env
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=$DB_PASSWORD
- POSTGRES_DB=$DB_NAME
- POSTGRES_USER=$DB_USER
adminer:
container_name: matching-app-adminer
image: adminer:4.8.1-standalone
ports:
- 8081:8080
client:
container_name: matching-app-client
build:
context: ./client
dockerfile: ./Dockerfile
volumes:
- ./client:/app
environment:
- WDS_SOCKET_PORT=3600
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.rule=Host(`local.cuyuan.cc`)"
- "traefik.http.services.client.loadbalancer.server.port=3000"
- "traefik.http.routers.client.service=client"
- "traefik.http.routers.client-ws.rule=Host(`local.cuyuan.cc`) && PathPrefix(`/ws`)"
- "traefik.http.routers.client-ws.service=client"
- "traefik.http.services.client.loadbalancer.sticky.cookie=true"
- "traefik.http.services.client.loadbalancer.sticky.cookie.name=client_sticky"
traefik:
image: traefik:v2.5
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:3600"
- "--api.dashboard=true"
ports:
- "3600:3600"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
postgres-data: {}