forked from bagofwords1/bagofwords
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
92 lines (88 loc) · 2.98 KB
/
docker-compose.dev.yaml
File metadata and controls
92 lines (88 loc) · 2.98 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
# =============================================================================
# Bag of Words - Development Docker Compose (no SSL)
# =============================================================================
#
# Quick Start:
# 1. Create a .env file with your configuration (see below)
# 2. Run: docker compose -f docker-compose.dev.yaml up -d
#
# Environment Variables (create .env file):
# POSTGRES_USER=bow # PostgreSQL username
# POSTGRES_PASSWORD=your_secure_pw # PostgreSQL password (CHANGE THIS!)
# POSTGRES_DB=bagofwords # Database name
# POSTGRES_PORT=5432 # PostgreSQL port (optional)
# APP_PORT=3000 # Application port (optional)
# BOW_ENCRYPTION_KEY= # Fernet encryption key (44 chars, ends with =)
# BOW_LICENSE_KEY= # Enterprise license key (optional)
#
# Generate encryption key:
# python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
#
# =============================================================================
services:
postgres:
image: postgres:16-alpine
container_name: bow-postgres-dev
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-bow}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-bowpassword}
POSTGRES_DB: ${POSTGRES_DB:-bagofwords}
volumes:
- postgres_data_dev:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-bow} -d ${POSTGRES_DB:-bagofwords}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- bow-network-dev
app:
image: bagofwords/bagofwords:latest
pull_policy: always
container_name: bow-app-dev
restart: unless-stopped
ports:
- "${APP_PORT:-3000}:3000"
environment:
- NODE_ENV=production
- ENVIRONMENT=production
# Database configuration
- BOW_DATABASE_URL=postgresql://${POSTGRES_USER:-bow}:${POSTGRES_PASSWORD:-bowpassword}@postgres:5432/${POSTGRES_DB:-bagofwords}
# Encryption key
- BOW_ENCRYPTION_KEY=${BOW_ENCRYPTION_KEY:-}
# Enterprise license key (optional)
- BOW_LICENSE_KEY=${BOW_LICENSE_KEY:-}
# Config path
- BOW_CONFIG_PATH=/app/bow-config.yaml
volumes:
- ./bow-config.yaml:/app/bow-config.yaml:ro
- uploads_data_dev:/app/backend/uploads
- branding_data_dev:/app/backend/branding_uploads
- logs_data_dev:/app/backend/logs
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:3000/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
networks:
- bow-network-dev
volumes:
postgres_data_dev:
driver: local
uploads_data_dev:
driver: local
branding_data_dev:
driver: local
logs_data_dev:
driver: local
networks:
bow-network-dev:
driver: bridge