docker-compose.yml 837 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
version: "3.3"

services:
  db:
    image: postgres
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
  migrate:
    image: eanagnostopoulou/naiades-watering-web
    command: python manage.py migrate --noinput
    environment:
        - POSTGRES_HOST=db
        - POSTGRES_DB=postgres
        - POSTGRES_USER=postgres
        - POSTGRES_PASSWORD=postgres
    depends_on:
      - db
  web:
    build: .
    image: eanagnostopoulou/naiades-watering-web
Cédric Crettaz's avatar
Cédric Crettaz committed
23
24
25
26
27
    command: python manage.py runserver 0.0.0.0:8000
    ports:
      - "${NAIADES_WATERING_PORT:-5001}:8000"
    #expose:
     # - "80"
28
29
30
31
32
33
34
    environment:
        - POSTGRES_HOST=db
        - POSTGRES_DB=postgres
        - POSTGRES_USER=postgres
        - POSTGRES_PASSWORD=postgres
    depends_on:
      - db
Cédric Crettaz's avatar
Cédric Crettaz committed
35
      - migrate