-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
47 lines (45 loc) · 1.25 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
version: "3.7"
services:
traefik:
image: traefik:v2.3
command:
- --api.insecure=1
- --entrypoints.web.address=:80
- --providers.docker.exposedByDefault=false
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- "80:80"
- "443:443"
frontend:
build:
context: ./containers/frontend
command: npm run start
volumes:
- ./containers/frontend/app:/usr/src/app
labels:
traefik.enable: "true"
traefik.port: 3000
traefik.http.services.frontend.loadbalancer.server.port: 3000
traefik.http.routers.frontend.rule: Host(`dev.lan`)
environment:
NODE_ENV: "development"
ENVIRONMENT: "dev"
api:
container_name: api
build:
context: ./containers/api
command: /start-reload.sh
volumes:
- ./containers/api/app:/app
labels:
traefik.enable: "true"
traefik.port: 80
traefik.http.services.api.loadbalancer.server.port: 80
traefik.http.routers.api.rule: Host(`dev.lan`) && PathPrefix(`/api`)
## Since AWS ELB does not support path rewrite, we need to manually prefix routes
## See app/main.py for details
environment:
SECRET_KEY: "dev_secret_key"
DEBUG: "true"
ENVIRONMENT: "dev"