-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
58 lines (49 loc) · 2.1 KB
/
compose.dev.yml
File metadata and controls
58 lines (49 loc) · 2.1 KB
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
x-dev-common: &dev-common
image: "nsidc/aross-stations-db:dev"
build: "."
volumes:
- "${PWD}:/app"
services:
ui:
labels:
- "traefik.enable=true"
# local - you may need to tweak this for dev VM's
- "traefik.http.routers.aross-ui.rule=Host(`localhost`) && PathPrefix(`/apps/aross-stations`)"
- "traefik.http.routers.aross-ui.entrypoints=websecure"
- "traefik.http.routers.aross-ui.tls=true"
- "traefik.http.routers.aross-ui.tls.certresolver=letsencrypt"
- "traefik.http.routers.aross-ui.middlewares=aross-ui"
- "traefik.http.routers.aross-ui.service=aross-ui"
- "traefik.http.middlewares.aross-ui.stripprefix.prefixes=/apps/aross-stations"
- "traefik.http.services.aross-ui.loadbalancer.server.port=80"
api:
<<: *dev-common
command: ["dev", "--host", "0.0.0.0", "./src/aross_stations_db/api"]
# ports:
# - "8000:8000"
# NOTE: In place of the above command, which uses the image's default
# `fastapi` entrypoint, you can run the container with no server (using
# "sleep" instead):
#
# entrypoint: "sleep"
# command: ["9999999"]
#
# ... then, you can connect to the container for debugging, e.g. by
# placing a breakpoint in code then interactively running the server
# process:
# docker compose exec api fastapi dev --host 0.0.0.0 ./src/aross_stations_db/api
labels:
- "traefik.enable=true"
# local - you may need to tweak this for dev VM's
- "traefik.http.routers.aross-api.rule=Host(`localhost`) && PathPrefix(`/api/aross-stations`)"
- "traefik.http.routers.aross-api.entrypoints=websecure"
- "traefik.http.routers.aross-api.tls=true"
- "traefik.http.routers.aross-api.tls.certresolver=letsencrypt"
- "traefik.http.routers.aross-api.middlewares=aross-api"
- "traefik.http.routers.aross-api.service=aross-api"
- "traefik.http.middlewares.aross-api.stripprefix.prefixes=/api/aross-stations"
- "traefik.http.services.aross-api.loadbalancer.server.port=8000"
cli:
<<: *dev-common
jupyterlab:
<<: *dev-common