aboutsummaryrefslogtreecommitdiff
path: root/docker-compose.yaml
blob: 4afde36a69648b3542194849f253beae020696b2 (plain)
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
version: "3.4"
services:
  scale-api:
    image: "node:latest"
    container_name: scale-api
    user: "root"
    working_dir: /home/node/app
    environment:
      - NODE_ENV=production
    volumes:
      - ./:/home/node/app
    ports:
      - "6969:6969"
    depends_on:
      - db
    command: "npm run dev"
  db:
    image: postgres:latest
    container_name: scale-postgres
    environment:
      - POSTGRES_USER=scale
      - POSTGRES_PASSWORD=secret
    volumes:
      - scale-db:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "scale"]
      interval: 10s
      start_period: 30s

volumes:
  scale-db: