Files
adam-acs/docker-compose.yml
T

53 lines
1.2 KiB
YAML

services:
mongodb:
image: mongo:7
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: adam
MONGO_INITDB_ROOT_PASSWORD: adam
MONGO_INITDB_DATABASE: adam-acs
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
app:
build: .
ports:
- "8080:8080"
env_file: .env
environment:
MONGODB_URI: mongodb://adam:adam@mongodb:27017/adam-acs?authSource=admin
NODE_ENV: production
LOG_LEVEL: debug
PORT: 8080
HOST: 0.0.0.0
depends_on:
mongodb:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:8080/api/v1/checklife').then(r=>{process.exit(r.ok?0:1)}).catch(()=>process.exit(1))"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
genieacs-sim:
build:
context: .
dockerfile: Dockerfile.genieacs-sim
restart: unless-stopped
depends_on:
app:
condition: service_healthy
entrypoint: ["sh", "-c", "exec ./genieacs-sim --acs-url \"http://app:8080/cwmp10\""]
profiles:
- test
volumes:
mongo_data: