2021-10-06 14:06:55 +13:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
local-postgres-data:
|
|
|
|
name: local-postgres-data
|
|
|
|
|
|
|
|
services:
|
|
|
|
django-backend:
|
|
|
|
restart: unless-stopped
|
|
|
|
build:
|
|
|
|
context: backend
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
container_name: righttree-backend
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
volumes:
|
|
|
|
- ./backend:/app
|
2021-10-22 16:01:31 +13:00
|
|
|
environment:
|
|
|
|
- LINZ_API_KEY=${LINZ_API_KEY}
|
2021-10-06 14:06:55 +13:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
2021-10-15 15:20:14 +13:00
|
|
|
command: bash -c "./manage.py runserver 0.0.0.0:8000"
|
2021-10-06 14:06:55 +13:00
|
|
|
|
|
|
|
react-frontend:
|
|
|
|
image: node:16-alpine3.11
|
|
|
|
restart: unless-stopped
|
|
|
|
container_name: righttree-frontend
|
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
volumes:
|
|
|
|
- ./frontend:/app
|
|
|
|
working_dir: /app
|
|
|
|
command: sh -c "npm install; npm start"
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: postgis/postgis:13-3.0
|
|
|
|
restart: unless-stopped
|
|
|
|
container_name: postgres
|
|
|
|
volumes:
|
|
|
|
- local-postgres-data:/var/lib/postgresql/data
|
2021-10-15 15:20:14 +13:00
|
|
|
- ./create_database.sql:/docker-entrypoint-initdb.d/create_database.sql
|
2021-10-06 14:06:55 +13:00
|
|
|
ports:
|
|
|
|
- "5432:5432"
|
|
|
|
environment:
|
|
|
|
- POSTGRES_DB=postgres
|
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
- POSTGRES_PASSWORD=postgres
|
|
|
|
|