-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
38 lines (35 loc) · 1.02 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
version: "3.9"
services:
api:
build:
context: ./api/
dockerfile: ./Dockerfile
command: uvicorn api.main:app --host 0.0.0.0 --reload --root-path /api/v1
ports:
- "8000:8000"
volumes:
- ./api:/api
depends_on:
- traefik
env_file:
- ./api/.env.production
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`amp.nmbgmr.nmt.edu`) && PathPrefix(`/api/v1`)"
- "traefik.http.routers.api.entrypoints=web"
- "traefik.http.routers.api.middlewares=api-sp"
- "traefik.http.middlewares.api-sp.stripprefix.prefixes=/api/v1"
- "traefik.http.middlewares.api-sp.stripprefix.forceSlash=false"
restart: on-failure
traefik:
image: "traefik:v2.9"
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"