aboutsummaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: b4c08e070b8afa8baed1629de2dc490600a9e3fc (plain) (blame)
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
version: "3"
services:
  nginx:
    image: nginx:mainline-alpine
    networks:
      backend:
        ipv4_address: 172.21.23.2
    volumes:
      - ./static:/var/www
      - ./nginx.conf:/etc/nginx/nginx.conf

  app:
    build: .
    image: dispatch-app:latest
    networks:
      backend:
        ipv4_address: 172.21.23.3
    working_dir: /app
    volumes:
      - ./app:/app
      - ./static:/var/www

  postgres:
    image: postgres:11.2
    networks:
      backend:
        ipv4_address: 172.21.23.4
    volumes:
      - db-data:/var/lib/postgresql/data

volumes:
  db-data:

networks:
  backend:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.21.23.0/24