version: '3' services: aocov: build: context: . dockerfile: Dockerfile args: # On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000. USER_UID: 1000 USER_GID: 1000 INSTALL_ZSH: "false" MONGO_TOOLS_VERSION: 4.2 # Volume directory for hosted files. This directory is created on image build with proper permissions. This is set as an env-var in the Dockerfile HOST_DIR: /dist environment: # port and bind info PORT: 3000 BIND_ADDRESS: localhost TARGET_URL: http://localhost:3000 # DB info MONGO_URI: mongodb://aocov-db:27017 MONGO_DB: ao-coverage # App configuration LOG_LEVEL: info UPLOAD_LIMIT: 4194304 STAGE_1: 95 STAGE_2: 80 volumes: - ..:/workspace:cached - dev-dist:/dist:cached # Overrides default command so things don't shut down after the process ends. command: sleep infinity # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. network_mode: service:aocov-db # Uncomment the next line to use a non-root user for all processes. user: node # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. # (Adding the "ports" property to this file will not forward from a Codespace.) aocov-db: image: mongo:latest restart: unless-stopped volumes: - mongodb-data:/data/db - ./mongo:/docker-entrypoint-initdb.d environment: MONGO_INITDB_DATABASE: ao-coverage # Add "forwardPorts": ["27017"] to **devcontainer.json** to forward MongoDB locally. # (Adding the "ports" property to this file will not forward from a Codespace.) volumes: mongodb-data: node-nm: dev-dist: