-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
144 lines (139 loc) · 4.85 KB
/
Copy pathdocker-compose.yml
File metadata and controls
144 lines (139 loc) · 4.85 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
volumes:
atlas3-postgres-data:
name: atlas3-postgres-data
atlas3-webapi-data:
name: atlas3-webapi-data
atlas3-caddy-data:
name: atlas3-caddy-data
services:
atlas3-postgres:
image: ohdsi/broadsea-atlasdb:2.3.0
container_name: atlas3-postgres
hostname: broadsea-atlasdb
platform: linux/amd64
restart: unless-stopped
cpus: 2
mem_limit: "2G"
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mypass}
volumes:
- atlas3-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10
atlas3-webapi:
image: atlas3-webapi:local
build:
context: ./docker/webapi
dockerfile: Dockerfile
args:
WEBAPI_DIGEST: sha256:d4a2e14341c4674d94caf07f9a03726c2574be4d2d1e0f2c5ed127db59cc87c3
TREXSQL_VERSION: "0.3.3"
container_name: atlas3-webapi
platform: linux/amd64
restart: unless-stopped
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/WebAPI/info || exit 1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 60s
environment:
# Database configuration
DATASOURCE_DRIVERCLASSNAME: org.postgresql.Driver
DATASOURCE_URL: jdbc:postgresql://atlas3-postgres:5432/postgres?currentSchema=webapi
DATASOURCE_USERNAME: postgres
DATASOURCE_PASSWORD: mypass
DATASOURCE_OHDSI_SCHEMA: webapi
SPRING_JPA_PROPERTIES_HIBERNATE_DEFAULT_SCHEMA: webapi
SPRING_BATCH_REPOSITORY_TABLEPREFIX: webapi.batch_
# Flyway migration settings
FLYWAY_DATASOURCE_USERNAME: postgres
FLYWAY_DATASOURCE_PASSWORD: mypass
SPRING_FLYWAY_URL: jdbc:postgresql://atlas3-postgres:5432/postgres?currentSchema=webapi
SPRING_FLYWAY_USER: postgres
SPRING_FLYWAY_PASSWORD: mypass
SPRING_FLYWAY_SCHEMAS: webapi
SPRING_FLYWAY_TABLE: flyway_schema_history
SPRING_FLYWAY_BASELINE_VERSION: "3.0.0"
SPRING_FLYWAY_PLACEHOLDERS_OHDSISCHEMA: webapi
FLYWAY_BASELINE_VERSION: "3.0.0"
# Security configuration
SECURITY_CORS_ENABLED: "true"
SECURITY_CORS_ALLOWED_ORIGINS: "http://localhost,https://localhost"
# Auth providers (disable all except DB)
SECURITY_AUTH_DB_ENABLED: "true"
SECURITY_AUTH_WINDOWS_ENABLED: "false"
SECURITY_AUTH_KERBEROS_ENABLED: "false"
SECURITY_AUTH_OIDC_ENABLED: "false"
SECURITY_AUTH_OAUTH_FACEBOOK_ENABLED: "false"
SECURITY_AUTH_OAUTH_GITHUB_ENABLED: "false"
SECURITY_AUTH_OAUTH_GOOGLE_ENABLED: "false"
SECURITY_AUTH_LDAP_ENABLED: "false"
SECURITY_AUTH_AD_ENABLED: "false"
SECURITY_AUTH_CAS_ENABLED: "false"
# OAuth callbacks
SECURITY_AUTH_OAUTH_CALLBACK_UI: "http://localhost/atlas/#/oauth/callback"
SECURITY_AUTH_OAUTH_CALLBACK_API: "http://localhost:8080/WebAPI/user/oauth/callback"
# DB-auth datasource (reads webapi.auth_user)
SECURITY_AUTH_DB_DATASOURCE_DRIVER_CLASS_NAME: org.postgresql.Driver
SECURITY_AUTH_DB_DATASOURCE_URL: jdbc:postgresql://atlas3-postgres:5432/postgres?currentSchema=webapi
SECURITY_AUTH_DB_DATASOURCE_USERNAME: postgres
SECURITY_AUTH_DB_DATASOURCE_PASSWORD: mypass
SECURITY_AUTH_DB_DATASOURCE_SCHEMA: webapi
# TrexSQL
TREXSQL_ENABLED: "true"
TREXSQL_CACHE_PATH: /data/cache
HOME: /data
# Pythia AI agent (bao plugin baked into the WebAPI image). Reads
# AWS_BEARER_TOKEN_BEDROCK from .env via env_file below. AWS_REGION
# and BAO_AGENT_MODEL are safe to commit — only the bearer token
# is sensitive.
AWS_REGION: us-east-1
BAO_AGENT_MODEL: ${BAO_AGENT_MODEL:-minimax.minimax-m2.5}
env_file:
- .env
volumes:
- atlas3-webapi-data:/data
depends_on:
atlas3-postgres:
condition: service_healthy
atlas3-db-init:
image: postgres:16-alpine
container_name: atlas3-db-init
volumes:
- ./atlasdb:/scripts:ro
environment:
PGHOST: atlas3-postgres
PGUSER: postgres
PGPASSWORD: ${POSTGRES_PASSWORD:-mypass}
PGDATABASE: postgres
depends_on:
atlas3-webapi:
condition: service_healthy
command: sh -c 'for f in /scripts/*.sql; do psql -f "$$f"; done'
atlas3-frontend:
image: ghcr.io/ohdsi/atlas3:dev
build:
context: .
dockerfile: Dockerfile
container_name: atlas3-frontend
platform: linux/amd64
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- atlas3-caddy-data:/data
environment:
WEBAPI_URL: ${WEBAPI_URL:-https://localhost/WebAPI}
CADDY_HOSTNAME: ${CADDY_HOSTNAME:-localhost}
CADDY_TLS_DIRECTIVE: ${CADDY_TLS_DIRECTIVE:-tls internal}
depends_on:
atlas3-db-init:
condition: service_completed_successfully