-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
63 lines (59 loc) · 1.53 KB
/
docker-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
version: '3'
services:
# Dev profile
traefik:
profiles: ["dev"]
restart: unless-stopped
image: "traefik:v2.10"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
vite-app:
profiles: ["dev"]
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.vite-app.rule=Host(`vite-app.localhost`)"
- "traefik.http.routers.vite-app.entrypoints=web"
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- ".:/home/node/app"
- "/home/node/app/node_modules"
environment:
- NODE_ENV=development
# Prod profile
traefik-prod:
profiles: ["prod"]
restart: unless-stopped
image: "traefik:v2.10"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
vite-app-prod:
profiles: ["prod"]
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.vite-app.rule=Host(`vite-app.localhost`)"
- "traefik.http.routers.vite-app.entrypoints=web"
build:
context: .
dockerfile: Dockerfile.prod
environment:
- NODE_ENV=production