-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.simple.yml
More file actions
73 lines (68 loc) · 1.88 KB
/
Copy pathdocker-compose.simple.yml
File metadata and controls
73 lines (68 loc) · 1.88 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
# ===========================================
# Oreko — Simple Production Deployment
# ===========================================
# 2 services only: web + postgres
# No reverse proxy — use your own nginx/Caddy/cloudflare or access directly on port 3000
# For SSL/Traefik setup, see docker-compose.prod.yml
#
# Usage:
# docker compose -f docker-compose.simple.yml up -d
version: '3.8'
services:
# Oreko Web Application
web:
build:
context: .
dockerfile: Dockerfile
args:
- NODE_ENV=production
container_name: oreko-web
restart: unless-stopped
environment:
NODE_ENV: production
DATABASE_URL: postgresql://${POSTGRES_USER:-oreko}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-oreko}?schema=public
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
AUTH_TRUST_HOST: "true"
ports:
- '3000:3000'
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:3000/api/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
memory: 1G
cpus: '1.0'
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: oreko-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-oreko}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-oreko}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-oreko}']
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
volumes:
postgres_data:
networks:
default:
name: oreko-network