-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
160 lines (152 loc) · 5.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
160 lines (152 loc) · 5.34 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: "3.9"
services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: openpr
POSTGRES_USER: openpr
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD for PostgreSQL}
expose:
- "5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openpr -d openpr"]
interval: 5s
timeout: 3s
retries: 20
start_period: 10s
networks:
- openpr-network
api:
build:
context: .
dockerfile: Dockerfile.prebuilt
args:
APP_BIN: api
command: ["/app/api"]
environment:
APP_NAME: api
BIND_ADDR: 0.0.0.0:8080
DATABASE_URL: postgres://openpr:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD for PostgreSQL}@postgres:5432/openpr
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET for OpenPR services}
JWT_ACCESS_TTL_SECONDS: ${JWT_ACCESS_TTL_SECONDS:-2592000}
JWT_REFRESH_TTL_SECONDS: ${JWT_REFRESH_TTL_SECONDS:-2592000}
RUST_LOG: ${RUST_LOG:-info}
UPLOAD_DIR: /app/uploads
OPENPR_OBJECT_STORAGE_BACKEND: ${OPENPR_OBJECT_STORAGE_BACKEND:-local}
OPENPR_OBJECT_STORAGE_DIR: ${OPENPR_OBJECT_STORAGE_DIR:-/app/uploads}
OPENPR_OBJECT_STORAGE_S3_ENDPOINT: ${OPENPR_OBJECT_STORAGE_S3_ENDPOINT:-}
OPENPR_OBJECT_STORAGE_S3_BUCKET: ${OPENPR_OBJECT_STORAGE_S3_BUCKET:-}
OPENPR_OBJECT_STORAGE_S3_REGION: ${OPENPR_OBJECT_STORAGE_S3_REGION:-us-east-1}
OPENPR_OBJECT_STORAGE_S3_ACCESS_KEY_ID: ${OPENPR_OBJECT_STORAGE_S3_ACCESS_KEY_ID:-}
OPENPR_OBJECT_STORAGE_S3_SECRET_ACCESS_KEY: ${OPENPR_OBJECT_STORAGE_S3_SECRET_ACCESS_KEY:-}
OPENPR_OBJECT_STORAGE_S3_SESSION_TOKEN: ${OPENPR_OBJECT_STORAGE_S3_SESSION_TOKEN:-}
ports:
- "${OPENPR_BIND_HOST:-127.0.0.1}:${OPENPR_API_PORT:-8081}:8080"
volumes:
- ./uploads:/app/uploads
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
restart: unless-stopped
networks:
- openpr-network
worker:
build:
context: .
dockerfile: Dockerfile.prebuilt
args:
APP_BIN: worker
command: ["/app/worker"]
environment:
APP_NAME: worker
DATABASE_URL: postgres://openpr:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD for PostgreSQL}@postgres:5432/openpr
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET for OpenPR services}
JWT_ACCESS_TTL_SECONDS: ${JWT_ACCESS_TTL_SECONDS:-2592000}
JWT_REFRESH_TTL_SECONDS: ${JWT_REFRESH_TTL_SECONDS:-2592000}
RUST_LOG: ${RUST_LOG:-info}
OPENPR_OBJECT_STORAGE_BACKEND: ${OPENPR_OBJECT_STORAGE_BACKEND:-local}
OPENPR_OBJECT_STORAGE_DIR: ${OPENPR_OBJECT_STORAGE_DIR:-/app/uploads}
OPENPR_OBJECT_STORAGE_S3_ENDPOINT: ${OPENPR_OBJECT_STORAGE_S3_ENDPOINT:-}
OPENPR_OBJECT_STORAGE_S3_BUCKET: ${OPENPR_OBJECT_STORAGE_S3_BUCKET:-}
OPENPR_OBJECT_STORAGE_S3_REGION: ${OPENPR_OBJECT_STORAGE_S3_REGION:-us-east-1}
OPENPR_OBJECT_STORAGE_S3_ACCESS_KEY_ID: ${OPENPR_OBJECT_STORAGE_S3_ACCESS_KEY_ID:-}
OPENPR_OBJECT_STORAGE_S3_SECRET_ACCESS_KEY: ${OPENPR_OBJECT_STORAGE_S3_SECRET_ACCESS_KEY:-}
OPENPR_OBJECT_STORAGE_S3_SESSION_TOKEN: ${OPENPR_OBJECT_STORAGE_S3_SESSION_TOKEN:-}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
networks:
- openpr-network
mcp-server:
build:
context: .
dockerfile: Dockerfile.prebuilt
args:
APP_BIN: mcp-server
environment:
APP_NAME: mcp-server
RUST_LOG: ${RUST_LOG:-info}
OPENPR_API_URL: http://api:8080
OPENPR_BOT_TOKEN: ${OPENPR_BOT_TOKEN:?set OPENPR_BOT_TOKEN for the MCP server}
OPENPR_WORKSPACE_ID: ${OPENPR_WORKSPACE_ID:?set OPENPR_WORKSPACE_ID for the MCP server}
command: ["/app/mcp-server", "serve", "--transport", "http", "--bind-addr", "0.0.0.0:8090"]
ports:
- "${OPENPR_BIND_HOST:-127.0.0.1}:${MCP_SERVER_PORT:-8090}:8090"
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/health"]
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
restart: unless-stopped
networks:
- openpr-network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "${OPENPR_BIND_HOST:-127.0.0.1}:${OPENPR_FRONTEND_PORT:-3000}:80"
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
restart: unless-stopped
networks:
- openpr-network
webhook:
profiles:
- connectors
image: ${OPENPR_WEBHOOK_IMAGE:-ghcr.io/openprx/openpr-webhook:latest}
volumes:
- ${OPENPR_WEBHOOK_CONFIG:-./config/openpr-webhook.example.toml}:/etc/openpr-webhook/config.toml:ro
command: ["/app/openpr-webhook", "/etc/openpr-webhook/config.toml"]
ports:
- "${OPENPR_BIND_HOST:-127.0.0.1}:${OPENPR_WEBHOOK_PORT:-9090}:9090"
networks:
- openpr-network
restart: unless-stopped
volumes:
pgdata:
driver: local
networks:
openpr-network:
driver: bridge