-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
85 lines (68 loc) · 1.71 KB
/
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
x-common: &common
logging:
options:
max-size: "20m"
max-file: "5"
# TODO: Use a tag!
x-image: &image "nsidc/aross-stations-db"
services:
ui:
container_name: "aross-stations-ui"
depends_on: ["api"]
image: "nsidc/aross-stations-ui:latest"
ports:
- "80:80"
profiles: ["ui"]
api:
container_name: "aross-stations-api"
depends_on: ["db"]
image: *image
<<: *common
entrypoint: "fastapi"
command: ["run", "--host", "0.0.0.0", "./src/aross_stations_db/api"]
ports:
- "8000:8000"
environment:
AROSS_DB_CONNSTR: null
db:
container_name: "aross-stations-db"
image: "postgis/postgis:16-3.4-alpine"
<<: *common
environment:
POSTGRES_DB: "aross"
POSTGRES_USER: "aross"
POSTGRES_PASSWORD: null
volumes:
- "./_data:/var/lib/postgresql/data"
admin:
container_name: "aross-stations-admin"
depends_on: ["db"]
image: "adminer"
<<: *common
ports:
- "8080:8080"
restart: "unless-stopped"
cli:
container_name: "aross-stations-cli"
depends_on: ["db"]
image: *image
<<: *common
volumes:
- "${AROSS_DATA_BASEDIR}:/data"
environment:
AROSS_DATA_BASEDIR: "/data"
AROSS_DB_CONNSTR: null
# Prevents this "service" from running with `docker compose up`.
# Instead, it's intended to be used like `docker compose run cli --help`.
profiles: ["_"]
jupyterlab:
container_name: "aross-stations-jupyterlab"
depends_on: ["api"]
image: *image
<<: *common
entrypoint: "jupyter"
command: ["lab", "--allow-root", "--ip=0.0.0.0"]
ports:
- "8888:8888"
environment:
JUPYTER_TOKEN: "${POSTGRES_PASSWORD}"