aboutsummaryrefslogtreecommitdiff
path: root/.devcontainer/docker-compose.yml
blob: 41fec9eec03aa8d5fbcdfa98c83b34d27336663d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: '3.8'

services:
  aocov:
    build: 
      context: .
      dockerfile: Dockerfile
      args:
        VARIANT: 16-buster
        MONGO_TOOLS_VERSION: "5.0"

        # 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

    command: sleep infinity
    network_mode: service:aocov-db
    user: node

  aocov-db:
    image: mongo:latest
    restart: unless-stopped
    volumes:
      - mongodb-data:/data/db
      - ./mongo:/docker-entrypoint-initdb.d

    environment:
      MONGO_INITDB_DATABASE: ao-coverage

volumes:
  mongodb-data:
  node-nm:
  dev-dist: