services: nginx: image: ${NGINX_IMAGE:-nginx:1.27-alpine} container_name: license-nginx restart: unless-stopped ports: - "9527:80" volumes: - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro depends_on: - license-server networks: - license-network license-server: build: . container_name: license-server restart: unless-stopped expose: - "3000" environment: - MAIN_DATABASE_URL=${MAIN_DATABASE_URL:?MAIN_DATABASE_URL is required} - MAIN_DB_ENCRYPTION_KEY=${MAIN_DB_ENCRYPTION_KEY:?MAIN_DB_ENCRYPTION_KEY is required} - DATABASE_URL=${DATABASE_URL:?DATABASE_URL is required} - JWT_SECRET=${JWT_SECRET:?JWT_SECRET is required} - RSA_PRIVATE_KEY=${RSA_PRIVATE_KEY:?RSA_PRIVATE_KEY is required} - RSA_PUBLIC_KEY=${RSA_PUBLIC_KEY:?RSA_PUBLIC_KEY is required} - AES_SECRET_KEY=${AES_SECRET_KEY:?AES_SECRET_KEY is required} - LICENSE_REQUEST_SIGNING_SECRET=${LICENSE_REQUEST_SIGNING_SECRET:?LICENSE_REQUEST_SIGNING_SECRET is required} - ADMIN_INITIAL_PASSWORD=${ADMIN_INITIAL_PASSWORD:?ADMIN_INITIAL_PASSWORD is required} - NODE_ENV=production depends_on: postgres: condition: service_healthy networks: - license-network postgres: image: postgres:16-alpine container_name: license-postgres restart: unless-stopped environment: - POSTGRES_USER=${POSTGRES_USER:?POSTGRES_USER is required} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required} - POSTGRES_DB=${POSTGRES_DB:?POSTGRES_DB is required} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 5s timeout: 5s retries: 5 networks: - license-network volumes: postgres_data: networks: license-network: driver: bridge