2021-10-06 14:06:55 +13:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
volumes:
|
2021-12-10 13:17:37 +13:00
|
|
|
righttree-postgres-data:
|
|
|
|
name: righttree-postgres-data
|
2021-10-06 14:06:55 +13:00
|
|
|
|
|
|
|
services:
|
2021-11-16 17:30:40 +13:00
|
|
|
backend:
|
2021-10-06 14:06:55 +13:00
|
|
|
restart: unless-stopped
|
|
|
|
build:
|
|
|
|
context: backend
|
|
|
|
dockerfile: Dockerfile
|
2021-11-25 10:22:51 +13:00
|
|
|
container_name: backend
|
2021-10-06 14:06:55 +13:00
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
volumes:
|
|
|
|
- ./backend:/app
|
2021-10-22 16:01:31 +13:00
|
|
|
environment:
|
|
|
|
- LINZ_API_KEY=${LINZ_API_KEY}
|
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
|
|
|
|
2021-11-16 17:30:40 +13:00
|
|
|
frontend:
|
2021-10-06 14:06:55 +13:00
|
|
|
image: node:16-alpine3.11
|
|
|
|
restart: unless-stopped
|
2021-11-25 10:22:51 +13:00
|
|
|
container_name: frontend
|
2021-10-06 14:06:55 +13:00
|
|
|
volumes:
|
|
|
|
- ./frontend:/app
|
|
|
|
working_dir: /app
|
2021-12-01 09:39:45 +13:00
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
2021-10-06 14:06:55 +13:00
|
|
|
command: sh -c "npm install; npm start"
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: postgis/postgis:13-3.0
|
|
|
|
restart: unless-stopped
|
|
|
|
container_name: postgres
|
|
|
|
volumes:
|
2021-12-10 13:17:37 +13:00
|
|
|
- righttree-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:
|
2021-11-10 17:21:57 +13:00
|
|
|
- POSTGRES_DB=${POSTGRES_DB}
|
|
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
2021-11-25 10:22:51 +13:00
|
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
container_name: nginx
|
|
|
|
image: nginx
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- backend
|
|
|
|
- frontend
|
|
|
|
volumes:
|
|
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
2021-12-01 09:39:45 +13:00
|
|
|
- ./backend/right_tree/staticfiles:/etc/nginx/html/staticfiles
|
2021-11-25 10:22:51 +13:00
|
|
|
ports:
|
|
|
|
- "9000:80"
|