docker-compose.yaml 533 Bytes
Newer Older
1
2
3
4
5
version: "3.7"
services:
  backend:
    build: backend
    secrets:
6
      - db-password
7
    depends_on:
8
      - db
9
10
11
12
  db:
    image: postgres
    restart: always
    secrets:
13
      - db-password
14
    volumes:
15
16
17
18
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=example
      - POSTGRES_PASSWORD_FILE=/run/secrets/db-password
19
20
    expose:
      - 5432
21
    
22
23
24
  proxy:
    build: proxy
    ports:
25
      - 80:80
26
    depends_on: 
27
      - backend
28
volumes:
29
  db-data:
30
31
32
secrets:
  db-password:
    file: db/password.txt