-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
70 lines (69 loc) · 1.86 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
version: "3.8"
services:
db:
image: mysql:8.0.36
environment:
- MYSQL_ROOT_PASSWORD=1234
- MYSQL_DATABASE=ant
ports:
- "3306:3306"
traefik:
image: traefik:v3.2
command:
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:8888"
- "--entrypoints.traefik.address=:9876"
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.entryPoints=traefik"
- "traefik.http.routers.api.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
- "traefik.http.routers.api.service=api@internal"
ports:
- "8888:8888"
- "9876:9876"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
client:
build:
context: ./Ant-client
dockerfile: ../Dockerfile.client
environment:
- PORT=3434
- NODE_ENV=development
- VITE_API_ENDPOINT=http://localhost:8080
- VITE_GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
- VITE_GOOGLE_REDIRECT_URI=http://localhost:3434
- VITE_GOOGLE_SCOPE=profile email
volumes:
- ./Ant-client/src:/Ant-client/src
- ./Ant-client/vite.config.ts:/Ant-client/vite.config.ts
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.rule=Host(`ant.localhost`)"
- "traefik.http.services.client.loadbalancer.server.port=3434"
depends_on:
- traefik
- server
# scaleout
# deploy:
# mode: replicated
# replicas: 3
server:
build:
context: ./Ant-server
dockerfile: ../Dockerfile.server
environment:
- CORS_ORIGIN=http://ant.localhost:3434
- TZ=UTC
- PORT=8080
ports:
- "8080:8080"
restart: always
depends_on:
- db
volumes:
- ./Ant-server/src/:/Ant-server/src/