Add v120g 212ssu3
This commit is contained in:
parent
fa669a364f
commit
607789c8a3
@ -1,11 +1,9 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# MongoDB Service
|
# MongoDB Service
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo:6.0
|
image: mongo:6.0
|
||||||
container_name: infinity-mongodb
|
container_name: infinity-mongodb
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
|
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
|
||||||
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
|
||||||
@ -21,71 +19,61 @@ services:
|
|||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
start_period: 30s
|
|
||||||
|
|
||||||
# Web Application (Next.js)
|
# Web Application (Next.js)
|
||||||
webapp:
|
webapp:
|
||||||
build:
|
build:
|
||||||
context: ./webapp
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: webapp/Dockerfile
|
||||||
target: runner
|
|
||||||
container_name: infinity-webapp
|
container_name: infinity-webapp
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
mongodb:
|
mongodb:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=${NODE_ENV:-production}
|
- NODE_ENV=${NODE_ENV}
|
||||||
- DB_URI=${DB_URI}
|
- DB_URI=${DB_URI}
|
||||||
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
||||||
env_file: .env
|
env_file: .env
|
||||||
ports:
|
ports:
|
||||||
- "${APP_PORT:-8081}:3000"
|
- "8081:3000" # Let Docker assign a dynamic host port
|
||||||
networks:
|
networks:
|
||||||
- infinity-network
|
- infinity-network
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "wget", "--spider", "http://localhost:3000"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
start_period: 10s
|
|
||||||
|
|
||||||
# Worker Service (temporarily disabled for initial deployment)
|
# Worker Service
|
||||||
# worker:
|
worker:
|
||||||
# build:
|
build:
|
||||||
# context: .
|
context: .
|
||||||
# dockerfile: worker/Dockerfile
|
dockerfile: worker/Dockerfile
|
||||||
# container_name: infinity-worker
|
container_name: infinity-worker
|
||||||
# restart: unless-stopped
|
restart: always
|
||||||
# depends_on:
|
depends_on:
|
||||||
# mongodb:
|
mongodb:
|
||||||
# condition: service_healthy
|
condition: service_healthy
|
||||||
# environment:
|
environment:
|
||||||
# - NODE_ENV=${NODE_ENV:-production}
|
- DB_URI=${DB_URI}
|
||||||
# - DB_URI=${DB_URI}
|
env_file: .env
|
||||||
# env_file: .env
|
networks:
|
||||||
# networks:
|
- infinity-network
|
||||||
# - infinity-network
|
|
||||||
|
|
||||||
# Helper Service (runs once to create admin account)
|
# Helper Service (runs once to create admin account)
|
||||||
# create-admin:
|
create-admin:
|
||||||
# build:
|
build:
|
||||||
# context: .
|
context: .
|
||||||
# dockerfile: helpers/Dockerfile
|
dockerfile: helpers/Dockerfile
|
||||||
# container_name: infinity-create-admin
|
container_name: infinity-create-admin
|
||||||
# depends_on:
|
depends_on:
|
||||||
# mongodb:
|
mongodb:
|
||||||
# condition: service_healthy
|
condition: service_healthy
|
||||||
# environment:
|
environment:
|
||||||
# - DB_URI=${DB_URI}
|
- DB_URI=${DB_URI}
|
||||||
# - ADMIN_USERNAME=${ADMIN_USERNAME}
|
- ADMIN_USERNAME=${ADMIN_USERNAME}
|
||||||
# - ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||||
# - NODE_ENV=${NODE_ENV:-production}
|
env_file: .env
|
||||||
# env_file: .env
|
networks:
|
||||||
# networks:
|
- infinity-network
|
||||||
# - infinity-network
|
# This ensures the container exits after creating the admin account
|
||||||
# command: sh -c "python create_account.py"
|
command: sh -c "python create_account.py"
|
||||||
# profiles: ["create-admin"]
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
infinity-network:
|
infinity-network:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user