Files
linkforty/docker-compose.yml
T
2026-07-31 14:08:59 +09:00

92 lines
2.4 KiB
YAML

version: '3.8'
services:
# --- Reverse Proxy (Nginx) ---
nginx:
image: nginx:alpine
container_name: linkforty-nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
- ./nginx/well-known:/etc/nginx/well-known:ro
depends_on:
- linkforty-prod
- linkforty-sandbox
# ==========================================
# 1. 운영 (Prod) 환경
# ==========================================
postgres-prod:
image: postgres:15-alpine
container_name: linkforty-db-prod
restart: always
environment:
POSTGRES_USER: linkforty
POSTGRES_PASSWORD: secret_password_prod
POSTGRES_DB: linkforty_prod
volumes:
- pgdata_prod:/var/lib/postgresql/data
redis-prod:
image: redis:7-alpine
container_name: linkforty-redis-prod
restart: always
linkforty-prod:
build:
context: .
dockerfile: Dockerfile
image: linkforty-custom:latest
container_name: linkforty-core-prod
restart: always
environment:
- DATABASE_URL=postgresql://linkforty:secret_password_prod@postgres-prod:5432/linkforty_prod?sslmode=disable
- REDIS_URL=redis://redis-prod:6379
- PORT=3000
depends_on:
- postgres-prod
- redis-prod
# ==========================================
# 2. 개발 (Sandbox) 환경
# ==========================================
postgres-sandbox:
image: postgres:15-alpine
container_name: linkforty-db-sandbox
restart: always
environment:
POSTGRES_USER: linkforty
POSTGRES_PASSWORD: secret_password_sandbox
POSTGRES_DB: linkforty_sandbox
volumes:
- pgdata_sandbox:/var/lib/postgresql/data
redis-sandbox:
image: redis:7-alpine
container_name: linkforty-redis-sandbox
restart: always
linkforty-sandbox:
build:
context: .
dockerfile: Dockerfile
image: linkforty-custom:latest
container_name: linkforty-core-sandbox
restart: always
environment:
- DATABASE_URL=postgresql://linkforty:secret_password_sandbox@postgres-sandbox:5432/linkforty_sandbox?sslmode=disable
- REDIS_URL=redis://redis-sandbox:6379
- PORT=3001
depends_on:
- postgres-sandbox
- redis-sandbox
volumes:
pgdata_prod:
pgdata_sandbox: