version: "3.3" services: db: image: postgres:12.9 volumes: - ./data/db:/var/lib/postgresql/data environment: - POSTGRES_NAME=sigi - POSTGRES_USER=sigi - POSTGRES_PASSWORD=sigi - PGDATA=var/lib/postgresql/data networks: - sigi-net sigi: build: . command: python manage.py runserver 0.0.0.0:8000 volumes: - .:/code ports: - "8001:8000" environment: - DB_HOST=db - POSTGRES_NAME=postgres - POSTGRES_USER=sigi - POSTGRES_PASSWORD=sigi depends_on: - db networks: sigi-net: name: sigi-net driver: bridge