This commit is contained in:
2026-07-31 11:51:56 +09:00
parent 3271693051
commit d90a25919e
20 changed files with 14370 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-linkforty}
POSTGRES_USER: ${POSTGRES_USER:-linkforty}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-linkforty}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
linkforty:
# Use published image (recommended for production)
image: linkforty/core:latest
# OR build from source (for development)
# Uncomment the lines below and comment out the 'image:' line above
# build:
# context: .
# dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
# Database configuration
DATABASE_URL: postgresql://${POSTGRES_USER:-linkforty}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-linkforty}?sslmode=disable
# Redis configuration
REDIS_URL: redis://redis:6379
# Server configuration
NODE_ENV: ${NODE_ENV:-production}
PORT: ${PORT:-3000}
HOST: ${HOST:-0.0.0.0}
# Optional: JWT secret for authentication
# JWT_SECRET: ${JWT_SECRET}
# Optional: Email configuration
# SMTP_HOST: ${SMTP_HOST}
# SMTP_PORT: ${SMTP_PORT}
# SMTP_USER: ${SMTP_USER}
# SMTP_PASS: ${SMTP_PASS}
# EMAIL_FROM: ${EMAIL_FROM}
ports:
- "${LINKFORTY_PORT:-3000}:3000"
restart: unless-stopped
# Health check (optional, uncomment if needed)
# healthcheck:
# test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 40s
volumes:
postgres_data:
driver: local
redis_data:
driver: local
# Optional: Add network configuration for isolation
# networks:
# linkforty:
# driver: bridge