aboutsummaryrefslogtreecommitdiff
path: root/container-compose.yml
blob: fe72c6e741989a883bbe904c5e3824e555d65fd1 (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.8"
services:
  server:
    build:
      containerfile: Containerfile
      context: .
    depends_on:
      - database
    networks:
      - default
    ports:
      - "8080:8080"
    networks:
      - backend
  database:
    image: postgres:latest
    restart: always
    environment:
      - POSTGRES_USER=newsstand
      - POSTGRES_PASSWORD=newsstand
      - POSTGRES_DB=newsstand
    ports: 
      - "5432:5432"
    volumes:
      - data:/var/lib/postgresql/data
    networks:
      - backend
volumes:
  data:
networks:
  backend: