149 lines
3.8 KiB
YAML
149 lines
3.8 KiB
YAML
version: "3.8"
|
|
name: atlas-cmms
|
|
|
|
services:
|
|
# Nginx Proxy Manager
|
|
nginx-proxy-manager:
|
|
image: jc21/nginx-proxy-manager:latest
|
|
container_name: nginx-proxy-manager
|
|
restart: unless-stopped
|
|
ports:
|
|
# Public HTTP/HTTPS ports
|
|
- "80:80"
|
|
- "443:443"
|
|
# Admin interface
|
|
- "81:81"
|
|
volumes:
|
|
- npm_data:/data
|
|
- npm_letsencrypt:/etc/letsencrypt
|
|
networks:
|
|
- atlas-network
|
|
environment:
|
|
# Optional: Disable IPv6
|
|
DISABLE_IPV6: 'true'
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: atlas_db
|
|
environment:
|
|
POSTGRES_DB: atlas
|
|
POSTGRES_USER: ${DB_USER:-rootUser}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-mypassword}
|
|
ports:
|
|
- "5432:5432"
|
|
expose:
|
|
- "5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- atlas-network
|
|
restart: unless-stopped
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: atlas_minio
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin123}
|
|
expose:
|
|
- "9000"
|
|
- "9001"
|
|
volumes:
|
|
- minio_data:/data
|
|
networks:
|
|
- atlas-network
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
image: intelloop/atlas-cmms-backend:latest
|
|
container_name: atlas_api
|
|
depends_on:
|
|
- postgres
|
|
- minio
|
|
environment:
|
|
# Database Configuration
|
|
DB_URL: postgres/atlas
|
|
DB_USER: ${DB_USER:-rootUser}
|
|
DB_PWD: ${DB_PASSWORD:-mypassword}
|
|
|
|
# API Configuration
|
|
PUBLIC_API_URL: ${PUBLIC_API_URL:-http://localhost:8080}
|
|
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-your-jwt-secret-key-change-in-production}
|
|
|
|
# Frontend URL
|
|
PUBLIC_FRONT_URL: ${PUBLIC_FRONT_URL:-http://localhost:3000}
|
|
|
|
# MinIO Configuration
|
|
MINIO_ENDPOINT: minio:9000
|
|
MINIO_ACCESS_KEY: ${MINIO_ROOT_USER:-minioadmin}
|
|
MINIO_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-minioadmin123}
|
|
MINIO_BUCKET: ${MINIO_BUCKET:-atlas-bucket}
|
|
STORAGE_TYPE: ${STORAGE_TYPE:-minio}
|
|
|
|
# Email Configuration (Optional)
|
|
SMTP_HOST: ${SMTP_HOST:-}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
SMTP_USER: ${SMTP_USER:-}
|
|
SMTP_PWD: ${SMTP_PASSWORD:-}
|
|
MAIL_FROM: ${MAIL_FROM:-noreply@atlas-cmms.com}
|
|
|
|
# Application Configuration
|
|
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
|
|
|
|
# Optional Features
|
|
ENABLE_SSO: ${ENABLE_SSO:-false}
|
|
ENABLE_INVITATIONS: ${ENABLE_INVITATIONS:-false}
|
|
ENABLE_EMAIL_NOTIFICATIONS: ${ENABLE_EMAIL_NOTIFICATIONS:-false}
|
|
INVITATION_VIA_EMAIL: ${INVITATION_VIA_EMAIL:-false}
|
|
|
|
# Google OAuth2 (Optional)
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
|
|
|
|
# Microsoft OAuth2 (Optional)
|
|
MICROSOFT_CLIENT_ID: ${MICROSOFT_CLIENT_ID:-}
|
|
MICROSOFT_CLIENT_SECRET: ${MICROSOFT_CLIENT_SECRET:-}
|
|
|
|
expose:
|
|
- "8080"
|
|
volumes:
|
|
- ./backend/logos:/app/logos
|
|
networks:
|
|
- atlas-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: atlas_frontend
|
|
depends_on:
|
|
- api
|
|
environment:
|
|
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8080/api}
|
|
VITE_APP_NAME: ${VITE_APP_NAME:-Atlas CMMS}
|
|
VITE_APP_VERSION: ${VITE_APP_VERSION:-1.0.0}
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- atlas-network
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
minio_data:
|
|
driver: local
|
|
npm_data:
|
|
driver: local
|
|
npm_letsencrypt:
|
|
driver: local
|
|
|
|
networks:
|
|
atlas-network:
|
|
driver: bridge |