summaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
blob: 06a0b88428e8fc4eb6d73908f1045888415e783c (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
32
33
34
35
36
37
38
39
40
41
42
version: "3.7"

services:
  db:
    image: postgres:12-alpine
    tty: true
    environment:
      POSTGRES_PASSWORD: postgres
    ports:
      - 5432:5432
    volumes:
      - dbdata:/var/lib/postgresql/data

  backend:
    build: backend
    tty: true
    environment:
      DATABASE_HOST: db
      DATABASE_DB: postgres
      DATABASE_USER: postgres
      DATABASE_PASSWORD: postgres
    ports:
      - 4000:4000
    volumes:
      - ./backend/src:/app/src
      - ./backend/migrations:/app/migrations
    depends_on:
      - db

  frontend:
    build: frontend
    tty: false
    environment:
      REACT_APP_API_BASE_URL: http://localhost:4000
    ports:
      - 3000:3000
    volumes:
      - ./frontend/src:/app/src
      - ./frontend/public:/app/public

volumes:
  dbdata: