-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.stable.yml
93 lines (89 loc) · 3.06 KB
/
docker-compose.stable.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
# CAUTION: This docker-compose.yml file should only be used by the `invariant explorer` CLI command and not be used directly.
# This is not the development setup but what is used for released versions of the explorer.
# For a development setup (hot-reloading), please see docker-compose.local.yml.
# This stack will pull in the specified $VERSION of the app-api and app-ui services.
services:
traefik:
image: traefik:v2.0
container_name: "${APP_NAME}-local-traefik"
command:
- --providers.docker=true
# Enable the API handler in insecure mode,
# which means that the Traefik API will be available directly
# on the entry point named traefik.
- --api.insecure=true
# Define Traefik entry points to port [80] for http and port [443] for https.
- --entrypoints.web.address=0.0.0.0:80
- --log.level=INFO
networks:
- invariant-explorer-web
ports:
- '${PORT_HTTP}:80'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik-http.entrypoints=web"
app-api:
image: ghcr.io/invariantlabs-ai/explorer/app-api:${VERSION}
platform: linux/amd64
depends_on:
database:
condition: service_healthy
working_dir: /srv/app
env_file:
- .env
environment:
- PROJECTS_DIR=/srv/projects
- KEYCLOAK_CLIENT_ID_SECRET=${KEYCLOAK_CLIENT_ID_SECRET}
- TZ=Europe/Berlin
- DEV_MODE=${DEV_MODE}
- APP_NAME=${APP_NAME}
- CONFIG_FILE=/config/explorer.config.yml
networks:
- invariant-explorer-web
- internal
volumes:
- $CONFIG_FILE_NAME:/config/explorer.config.yml
- ./data/images:/srv/images
labels:
- "traefik.enable=true"
- "traefik.http.routers.$APP_NAME-api.rule=(Host(`localhost`) && PathPrefix(`/api/`)) || (Host(`127.0.0.1`) && PathPrefix(`/api/`))"
- "traefik.http.routers.$APP_NAME-api.entrypoints=web"
- "traefik.http.services.$APP_NAME-api.loadbalancer.server.port=8000"
- "traefik.docker.network=invariant-explorer-web"
app-ui:
image: ghcr.io/invariantlabs-ai/explorer/app-ui:${VERSION}
platform: linux/amd64
networks:
- invariant-explorer-web
volumes:
- $CONFIG_FILE_NAME:/config/explorer.config.yml
environment:
- APP_NAME=${APP_NAME}
- VITE_CONFIG_FILE=/config/explorer.config.yml
labels:
- "traefik.enable=true"
- "traefik.http.routers.$APP_NAME-ui.rule=Host(`localhost`)||Host(`127.0.0.1`)"
- "traefik.http.routers.$APP_NAME-ui.entrypoints=web"
- "traefik.http.services.$APP_NAME-ui.loadbalancer.server.port=8000"
- "traefik.docker.network=invariant-explorer-web"
database:
image: postgres:16
env_file:
- .env
networks:
- internal
volumes:
- type: bind
source: ./data/database
target: /var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
networks:
invariant-explorer-web:
external: true
internal: