-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (87 loc) · 3.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
94 lines (87 loc) · 3.22 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
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
name: ${INKCRE_COMPOSE_PROJECT_NAME:-inkcre}
x-core-image: &core-image
image: ${INKCRE_CORE_IMAGE:-inkcre-core-py:development}
x-core-build: &core-build
context: ${INKCRE_BUILD_CONTEXT:-.}
target: runtime
args:
SOURCE_REVISION: ${INKCRE_SOURCE_REVISION:-local}
services:
postgres:
image: pgvector/pgvector:pg17@sha256:d2ef61f42ef767baa5a1475393303cc235bcd92febd9d7014eddb48b41f3bad0
environment:
POSTGRES_DB: ${POSTGRES_DB:-inkcre}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-inkcre}",
]
interval: 5s
timeout: 5s
retries: 12
init:
<<: *core-image
build: *core-build
command:
["python", "scripts/container.py", "db", "init", "--profile", "development"]
depends_on:
postgres:
condition: service_healthy
environment:
CORE_DATABASE_PASSWORD: ${CORE_DATABASE_PASSWORD:-local-core-database-password-at-least-32-bytes}
MIGRATION_DATABASE_URL: "postgresql+psycopg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-inkcre}"
POSTGREST_DATABASE_PASSWORD: ${POSTGREST_DATABASE_PASSWORD:-local-postgrest-database-password-at-least-32-bytes}
core:
<<: *core-image
command: ["python", "scripts/container.py", "web"]
depends_on:
init:
condition: service_completed_successfully
environment:
PEER_ID: 00000000-0000-4000-8000-000000000002
PEER_LEASE_RENEW_INTERVAL_SECONDS: ${PEER_LEASE_RENEW_INTERVAL_SECONDS:-1}
PEER_NAME: core-py-development
DATABASE_URL: "postgresql+psycopg://inkcre_core:${CORE_DATABASE_PASSWORD:-local-core-database-password-at-least-32-bytes}@postgres:5432/${POSTGRES_DB:-inkcre}"
INKCRE_ENV_FILE: ""
JWT_SECRET: ${JWT_SECRET:-local-development-jwt-secret-at-least-32-bytes}
OBSRV__LOGGING_BACKEND: ${OBSRV__LOGGING_BACKEND:-none}
PORT: 8000
ports:
- "127.0.0.1:${CORE_PORT:-8000}:8000"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/readyz')",
]
interval: 10s
timeout: 5s
retries: 6
restart: unless-stopped
postgrest:
image: postgrest/postgrest:v14.15@sha256:2f8e7b656f09db697a8875177694b417b35cb76c21370de07fc54e711e902326
depends_on:
init:
condition: service_completed_successfully
environment:
PGRST_DB_ANON_ROLE: anonymous
PGRST_DB_PRE_REQUEST: inkcre_internal.check_jwt
PGRST_DB_SCHEMAS: inkcre
PGRST_DB_URI: "postgresql://authenticator:${POSTGREST_DATABASE_PASSWORD:-local-postgrest-database-password-at-least-32-bytes}@postgres:5432/${POSTGRES_DB:-inkcre}"
PGRST_JWT_AUD: inkcre-api
PGRST_JWT_SECRET: ${JWT_SECRET:-local-development-jwt-secret-at-least-32-bytes}
PGRST_SERVER_PORT: 3000
ports:
- "127.0.0.1:${POSTGREST_PORT:-3000}:3000"
restart: unless-stopped
volumes:
postgres_data: