summaryrefslogtreecommitdiffstats
path: root/docker-compose.prod.yml
blob: ae61e1db8c17a75a33d6393da1a4a4b64de36295 (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
version: "3.7"

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

  backend_prod:
    build: backend
    command: npm start
    tty: true
    environment:
      DATABASE_HOST: db_prod
      DATABASE_DB: postgres
      DATABASE_USER: postgres
      DATABASE_PASSWORD: postgres
      NODE_ENV: production
    ports:
      - 4000:4000
    depends_on:
      - db_prod

  frontend_prod:
    build:
      context: frontend
      dockerfile: Dockerfile.prod
    tty: true
    environment:
      REACT_APP_API_BASE_URL: http://localhost:4000
    ports:
      - 3000:80

volumes:
  dbdata_prod: