feat: add Docker Compose setup with Nginx, PostgreSQL, MinIO
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
89
docker/docker-compose.yml
Normal file
89
docker/docker-compose.yml
Normal file
@@ -0,0 +1,89 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: ${DATABASE_NAME:-afterlife}
|
||||
POSTGRES_USER: ${DATABASE_USERNAME:-afterlife}
|
||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-afterlife}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
restart: unless-stopped
|
||||
command: server /data --console-address ":9001"
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-afterlife}
|
||||
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-afterlife123}
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
|
||||
cms:
|
||||
build:
|
||||
context: ../apps/cms
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- postgres
|
||||
- minio
|
||||
environment:
|
||||
HOST: 0.0.0.0
|
||||
PORT: 1337
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_PORT: 5432
|
||||
DATABASE_NAME: ${DATABASE_NAME:-afterlife}
|
||||
DATABASE_USERNAME: ${DATABASE_USERNAME:-afterlife}
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-afterlife}
|
||||
APP_KEYS: ${APP_KEYS}
|
||||
API_TOKEN_SALT: ${API_TOKEN_SALT}
|
||||
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
|
||||
TRANSFER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
ports:
|
||||
- "1337:1337"
|
||||
|
||||
web:
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: apps/web/Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- cms
|
||||
environment:
|
||||
STRAPI_URL: http://cms:1337
|
||||
STRAPI_API_TOKEN: ${STRAPI_API_TOKEN}
|
||||
NEXT_PUBLIC_STRAPI_URL: ${PUBLIC_STRAPI_URL:-http://localhost:1337}
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- web
|
||||
- cms
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- certbot_certs:/etc/letsencrypt:ro
|
||||
- certbot_www:/var/www/certbot:ro
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot
|
||||
volumes:
|
||||
- certbot_certs:/etc/letsencrypt
|
||||
- certbot_www:/var/www/certbot
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
minio_data:
|
||||
certbot_certs:
|
||||
certbot_www:
|
||||
Reference in New Issue
Block a user