-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (86 loc) · 2.57 KB
/
docker-compose.yml
File metadata and controls
93 lines (86 loc) · 2.57 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
services:
db:
image: postgres:18
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: lims
volumes:
- pgdata:/var/lib/postgresql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 5s
timeout: 3s
retries: 5
postgrest:
image: postgrest/postgrest:v14.1
restart: unless-stopped
environment:
PGRST_DB_URI: postgres://postgrest_authenticator:postgrestpass@db:5432/lims
PGRST_DB_SCHEMAS: "app_core,app_security,app_provenance,app_eln,public"
PGRST_DB_ANON_ROLE: web_anon
PGRST_DB_PRE_REQUEST: app_security.pre_request
PGRST_JWT_SECRET: "dev_jwt_secret_change_me_which_is_at_least_32_characters"
PGRST_OPENAPI_SERVER_PROXY_URI: "http://localhost:${POSTGREST_HOST_PORT:-7100}"
PGRST_OPENAPI_MODE: "ignore-privileges"
depends_on:
db:
condition: service_healthy
ports:
- "${POSTGREST_HOST_PORT:-7100}:3000"
postgraphile:
build:
context: ./ops/postgraphile
restart: unless-stopped
depends_on:
- db
ports:
- "${POSTGRAPHILE_HOST_PORT:-7101}:3001"
environment:
POSTGRAPHILE_DB_URI: postgres://postgraphile_authenticator:postgraphilepass@db:5432/lims
POSTGRAPHILE_SCHEMAS: "app_core,app_provenance,app_eln"
POSTGRAPHILE_DEFAULT_ROLE: web_anon
POSTGRAPHILE_JWT_SECRET: "dev_jwt_secret_change_me_which_is_at_least_32_characters"
POSTGRAPHILE_JWT_AUD: "lims-dev"
POSTGRAPHILE_PORT: "3001"
POSTGRAPHILE_OWNER_CONNECTION: postgres://postgres:postgres@db:5432/lims
ui:
build: ./ui
environment:
VITE_POSTGREST_URL: http://postgrest:3000
depends_on:
- postgrest
ports:
- "5173:5173"
command: ["sh", "-c", "npm install && npm run dev -- --host 0.0.0.0 --port 5173"]
volumes:
- ${LOCAL_WORKSPACE_FOLDER:-.}/ui:/app
- ui_node_modules:/app/node_modules
dev:
image: mcr.microsoft.com/devcontainers/base:ubuntu
volumes:
- ./:/workspace
command: sleep infinity
depends_on:
- db
- postgrest
- postgraphile
dbmate:
image: amacneil/dbmate:2.13
entrypoint: ["dbmate"]
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/lims?sslmode=disable
DBMATE_MIGRATIONS_DIR: /db/migrations
DBMATE_SCHEMA_FILE: /db/schema.sql
volumes:
- ./ops/db:/db
working_dir: /db
depends_on:
db:
condition: service_healthy
volumes:
pgdata:
ui_node_modules: