22
This commit is contained in:
parent
2d13139bca
commit
dc9daa9685
@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# MongoDB Service
|
# MongoDB Service
|
||||||
mongodb:
|
mongodb:
|
||||||
@ -16,6 +14,11 @@ services:
|
|||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
networks:
|
networks:
|
||||||
- infinity-network
|
- infinity-network
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
# Web Application (Next.js)
|
# Web Application (Next.js)
|
||||||
webapp:
|
webapp:
|
||||||
@ -25,11 +28,13 @@ services:
|
|||||||
container_name: infinity-webapp
|
container_name: infinity-webapp
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb
|
mongodb:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=${NODE_ENV}
|
- 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
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
networks:
|
networks:
|
||||||
@ -43,9 +48,11 @@ services:
|
|||||||
container_name: infinity-worker
|
container_name: infinity-worker
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb
|
mongodb:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- DB_URI=${DB_URI}
|
- DB_URI=${DB_URI}
|
||||||
|
env_file: .env
|
||||||
networks:
|
networks:
|
||||||
- infinity-network
|
- infinity-network
|
||||||
|
|
||||||
@ -62,6 +69,7 @@ services:
|
|||||||
- DB_URI=${DB_URI}
|
- DB_URI=${DB_URI}
|
||||||
- ADMIN_USERNAME=${ADMIN_USERNAME}
|
- ADMIN_USERNAME=${ADMIN_USERNAME}
|
||||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||||
|
env_file: .env
|
||||||
networks:
|
networks:
|
||||||
- infinity-network
|
- infinity-network
|
||||||
# This ensures the container exits after creating the admin account
|
# This ensures the container exits after creating the admin account
|
||||||
@ -73,4 +81,4 @@ networks:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mongodb_data:
|
mongodb_data:
|
||||||
driver: local
|
driver: local
|
||||||
@ -1,7 +1,4 @@
|
|||||||
# requirements.txt
|
# requirements.txt
|
||||||
# Time and datetime
|
|
||||||
time
|
|
||||||
datetime
|
|
||||||
# Python-dotenv for loading environment variables
|
# Python-dotenv for loading environment variables
|
||||||
python-dotenv
|
python-dotenv
|
||||||
# pymongo for connecting to MongoDB
|
# pymongo for connecting to MongoDB
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user