- 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
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# PostgreSQL Database
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: korea_tourism_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: korea_tourism
|
|
POSTGRES_USER: tourism_user
|
|
POSTGRES_PASSWORD: tourism_password
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./database/init:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- tourism_network
|
|
|
|
# Node.js Application
|
|
app:
|
|
build: .
|
|
container_name: korea_tourism_app
|
|
restart: unless-stopped
|
|
environment:
|
|
- NODE_ENV=development
|
|
- DB_HOST=postgres
|
|
- DB_PORT=5432
|
|
- DB_NAME=korea_tourism
|
|
- DB_USER=tourism_user
|
|
- DB_PASSWORD=tourism_password
|
|
- PORT=3000
|
|
- SESSION_SECRET=dev-secret-change-in-production
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- .:/app
|
|
- /app/node_modules
|
|
- ./public/uploads:/app/public/uploads
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- tourism_network
|
|
command: npm run dev
|
|
|
|
# Adminer for database management (optional)
|
|
adminer:
|
|
image: adminer:latest
|
|
container_name: korea_tourism_adminer
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- tourism_network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|
|
networks:
|
|
tourism_network:
|
|
driver: bridge |