Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.71 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
services:
app:
# Use the pre-built image from GitHub Container Registry
image: ghcr.io/iblh/uplotr:latest
# Or build locally for development:
# build:
# context: .
# dockerfile: Dockerfile
container_name: uplotr_app
restart: always
ports:
- '3000:3000'
environment:
# Database connection string (points to the 'db' service)
- DATABASE_URL=postgresql://postgres:${DB_PASSWORD:-change-me-local}@db:5432/lorawan_tracker?schema=public
# Authentication
# AUTH_SECRET: Used to sign session cookies (JWT). MUST be a long random string.
- AUTH_SECRET=${AUTH_SECRET:?Set AUTH_SECRET in .env}
- AUTH_MODE=${AUTH_MODE:-REQUIRED}
- CRON_SECRET=${CRON_SECRET:?Set CRON_SECRET in .env}
- MAP_PROVIDER=${MAP_PROVIDER:-OPENFREEMAP}
- MAPBOX_TOKEN=${MAPBOX_TOKEN:-}
depends_on:
db:
condition: service_healthy
healthcheck:
test: ['CMD', 'wget', '-q', '--spider', 'http://127.0.0.1:3000/api/health']
interval: 30s
timeout: 5s
retries: 3
db:
image: postgres:15-alpine
container_name: lorawan_tracker_db
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${DB_PASSWORD:-change-me-local}
- POSTGRES_DB=lorawan_tracker
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d lorawan_tracker']
interval: 5s
timeout: 5s
retries: 10
volumes:
db_data: