- Full-stack Node.js/Express application with PostgreSQL - Modern ES modules architecture - AdminJS admin panel with Sequelize ORM - Tourism routes, guides, articles, bookings management - Responsive Bootstrap 5 frontend - Docker containerization with docker-compose - Complete database schema with migrations - Authentication system for admin panel - Dynamic placeholder images for tour categories
66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# PostgreSQL Database
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: korea_tourism_db_prod
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${DB_NAME}
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
volumes:
|
|
- postgres_data_prod:/var/lib/postgresql/data
|
|
- ./database/init:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- tourism_network_prod
|
|
|
|
# Node.js Application
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.prod
|
|
container_name: korea_tourism_app_prod
|
|
restart: unless-stopped
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DB_HOST=postgres
|
|
- DB_PORT=5432
|
|
- DB_NAME=${DB_NAME}
|
|
- DB_USER=${DB_USER}
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
- PORT=3000
|
|
- SESSION_SECRET=${SESSION_SECRET}
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./public/uploads:/app/public/uploads
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- tourism_network_prod
|
|
|
|
# Nginx Reverse Proxy
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: korea_tourism_nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
- ./docker/nginx/ssl:/etc/ssl
|
|
- ./public:/var/www/public
|
|
depends_on:
|
|
- app
|
|
networks:
|
|
- tourism_network_prod
|
|
|
|
volumes:
|
|
postgres_data_prod:
|
|
|
|
networks:
|
|
tourism_network_prod:
|
|
driver: bridge |