-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
112 lines (106 loc) · 2.92 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
services:
reverse-proxy:
restart: unless-stopped
image: traefik:v2.10
networks:
- mlflow
command:
- "--entrypoints.web.address=:80"
- "--providers.docker"
depends_on:
- mlflow
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mlflow:
restart: always
build:
context: mlflow
args:
MLFLOW_VERSION: ${MLFLOW_VERSION}
depends_on:
- database
networks:
- mlflow
volumes:
- ./mlflow/srv:/srv
- ${MLFLOW_BASE_PATH_LOCAL}/user-data:/var/data/user-data
- ${MLFLOW_BASE_PATH_LOCAL}/app-data:/var/data/app-data
- ${MLFLOW_BASE_PATH_LOCAL}/mlruns-data:/mlruns
env_file: .env
environment:
- MLFLOW_AUTH_CONFIG_PATH=/srv/auth_config.ini
expose:
- 5000
labels:
- "traefik.http.routers.mlflow.rule=Host(`${DOMAIN}`) && !PathPrefix(`/signup`) && !PathPrefix(`/${GOACCESS_WEB_ROUTE}`)"
- "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=12884901888"
- "traefik.http.middlewares.limit.buffering.memRequestBodyBytes=10485760"
- "traefik.http.middlewares.limit.buffering.maxResponseBodyBytes=12884901888"
- "traefik.http.middlewares.limit.buffering.memResponseBodyBytes=10485760"
signup:
restart: always
build:
context: signup
target: production
args:
OIDC_AUTHORITY: ${OIDC_AUTHORITY}
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID}
OIDC_REDIRECT_URI: https://${DOMAIN}/signup
PRIVACY_POLICY_URL: ${PRIVACY_POLICY_URL}
TERMS_OF_USE_URL: ${TERMS_OF_USE_URL}
env_file: .env
networks:
- mlflow
depends_on:
- mlflow
labels:
- "traefik.http.routers.signup.rule=Host(`${DOMAIN}`) && PathPrefix(`/signup`)"
database:
image: postgres:latest
restart: always
user: postgres
# non-root user inside container!
# (host) volume has to belong to "docker" uid:gid (e.g. lxd:docker)
volumes:
- ${MLFLOW_BASE_PATH_LOCAL}/app-data:/var/lib/postgresql/data
env_file: .env
environment:
- POSTGRES_DB=${DATABASE_NAME:?DATABASE_NAME is not set}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD:?DATABASE_PASSWORD is not set}
networks:
- mlflow
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
backup_db:
restart: always
build:
context: ./backup_db
args:
MLFLOW_VERSION: ${MLFLOW_VERSION}
init: true
depends_on:
- database
volumes:
- ${MLFLOW_BASE_PATH_LOCAL}/backup_db:/backup_files
- ${MLFLOW_BASE_PATH_LOCAL}/user-data:/var/data/user-data
- ${MLFLOW_BASE_PATH_LOCAL}/app-data:/var/data/app-data
env_file: .env
networks:
- mlflow
healthcheck:
test: ["CMD", "bash"]
interval: 10s
timeout: 5s
retries: 5
networks:
mlflow:
#volumes:
# user-data:
# app-data:
# mlruns-data:
# backup_db: