forked from ownpilot/OwnPilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (84 loc) · 2.5 KB
/
docker-compose.yml
File metadata and controls
87 lines (84 loc) · 2.5 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
services:
# PostgreSQL Database
postgres:
image: pgvector/pgvector:pg16
container_name: ownpilot-postgres
restart: unless-stopped
ports:
- '${POSTGRES_PORT:-25432}:5432'
environment:
- POSTGRES_USER=${POSTGRES_USER:-ownpilot}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-ownpilot_secret}
- POSTGRES_DB=${POSTGRES_DB:-ownpilot}
volumes:
- postgres-data:/var/lib/postgresql/data
- ./packages/gateway/src/db/migrations/postgres:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-ownpilot} -d ${POSTGRES_DB:-ownpilot}']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- ownpilot-network
profiles:
- postgres
# OwnPilot (API + UI in a single container)
# To use pre-built image instead of local build:
# image: ghcr.io/ownpilot/ownpilot:latest
gateway:
build:
context: .
dockerfile: Dockerfile
container_name: ownpilot
restart: unless-stopped
ports:
- '${PORT:-8080}:8080'
environment:
- NODE_ENV=production
- PORT=8080
- HOST=0.0.0.0
- OWNPILOT_DATA_DIR=/app/data
# Database (always connects to the postgres service inside Docker network)
- DATABASE_URL=${DATABASE_URL:-}
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=${POSTGRES_USER:-ownpilot}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-ownpilot_secret}
- POSTGRES_DB=${POSTGRES_DB:-ownpilot}
# Telegram
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-}
# Auth & Security
- AUTH_TYPE=${AUTH_TYPE:-none}
- API_KEYS=${API_KEYS:-}
- JWT_SECRET=${JWT_SECRET:-}
- CORS_ORIGINS=${CORS_ORIGINS:-*}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-}
# Rate Limiting
- RATE_LIMIT_DISABLED=${RATE_LIMIT_DISABLED:-false}
- RATE_LIMIT_WINDOW_MS=${RATE_LIMIT_WINDOW_MS:-60000}
- RATE_LIMIT_MAX=${RATE_LIMIT_MAX:-500}
# Logging
- LOG_LEVEL=${LOG_LEVEL:-info}
volumes:
- gateway-data:/app/data
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:8080/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- ownpilot-network
depends_on:
postgres:
condition: service_healthy
required: false
volumes:
gateway-data:
driver: local
postgres-data:
driver: local
networks:
ownpilot-network:
driver: bridge