2024-09-10 09:50:11 +00:00
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
services:
|
|
|
|
database-init:
|
|
|
|
container_name: database-init
|
2024-09-20 17:59:00 +00:00
|
|
|
image: hexastack/hexabot-api:latest
|
2024-09-10 09:50:11 +00:00
|
|
|
command: sh -c "npm run cache:init && npm run migrate prune && npm run migrate up"
|
|
|
|
env_file: .env
|
|
|
|
networks:
|
|
|
|
- db-network
|
|
|
|
depends_on:
|
|
|
|
mongo:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
api:
|
|
|
|
container_name: api
|
2024-09-20 17:59:00 +00:00
|
|
|
image: hexastack/hexabot-api:latest
|
2024-09-10 09:50:11 +00:00
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- ${API_PORT}:3000
|
|
|
|
networks:
|
|
|
|
- db-network
|
|
|
|
- app-network
|
|
|
|
volumes:
|
|
|
|
- api-data:/uploads
|
|
|
|
depends_on:
|
|
|
|
mongo:
|
|
|
|
condition: service_healthy
|
|
|
|
database-init:
|
|
|
|
condition: service_completed_successfully
|
|
|
|
healthcheck:
|
|
|
|
test: "wget --spider http://localhost:3000"
|
|
|
|
interval: 10s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 5
|
|
|
|
start_period: 10s
|
|
|
|
|
|
|
|
hexabot-frontend:
|
|
|
|
container_name: frontend
|
2024-09-20 17:59:00 +00:00
|
|
|
image: hexastack/hexabot-ui:latest
|
2024-09-10 09:50:11 +00:00
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- ${APP_FRONTEND_PORT}:8080
|
|
|
|
networks:
|
|
|
|
- app-network
|
|
|
|
depends_on:
|
|
|
|
api:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
mongo:
|
|
|
|
container_name: mongo
|
|
|
|
image: mongo:7.0
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
|
|
|
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
|
|
|
|
networks:
|
|
|
|
- db-network
|
|
|
|
healthcheck:
|
|
|
|
test: echo 'db.stats().ok' | mongosh localhost:27017 --quiet
|
|
|
|
interval: 10s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 5
|
|
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
|
|
- mongo-data:/data/db
|
|
|
|
|
|
|
|
widget:
|
|
|
|
container_name: widget
|
2024-09-20 17:59:00 +00:00
|
|
|
image: hexastack/hexabot-widget:latest
|
2024-09-10 09:50:11 +00:00
|
|
|
networks:
|
|
|
|
- app-network
|
|
|
|
depends_on:
|
|
|
|
api:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mongo-data:
|
|
|
|
api-data:
|
|
|
|
|
|
|
|
networks:
|
|
|
|
db-network:
|
|
|
|
app-network:
|