mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
63 lines
1.2 KiB
YAML
63 lines
1.2 KiB
YAML
version: "3.9"
|
|
|
|
volumes:
|
|
postgres_volume:
|
|
name: "postgres-db"
|
|
django_static_volume:
|
|
name: "static"
|
|
django_media_volume:
|
|
name: "media"
|
|
|
|
networks:
|
|
default:
|
|
name: concept-api-net
|
|
|
|
services:
|
|
frontend:
|
|
restart: always
|
|
depends_on:
|
|
- backend
|
|
build:
|
|
context: ./rsconcept/frontend
|
|
ports:
|
|
- 3000:3000
|
|
command: serve -s /home/node -l 3000
|
|
|
|
|
|
backend:
|
|
restart: always
|
|
depends_on:
|
|
- postgresql-db
|
|
- nginx
|
|
build:
|
|
context: ./rsconcept/backend
|
|
env_file: ./rsconcept/backend/.env.dev
|
|
ports:
|
|
- 8000:8000
|
|
volumes:
|
|
- django_static_volume:/home/app/web/static
|
|
- django_media_volume:/home/app/web/media
|
|
command:
|
|
gunicorn -w 3 project.wsgi --bind 0.0.0.0:8000
|
|
|
|
|
|
postgresql-db:
|
|
restart: always
|
|
image: postgres:alpine
|
|
env_file: ./postgresql/.env.dev
|
|
volumes:
|
|
- postgres_volume:/var/lib/postgresql/data
|
|
|
|
|
|
nginx:
|
|
restart: always
|
|
build:
|
|
context: ./nginx
|
|
ports:
|
|
- 1337:80
|
|
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
|
volumes:
|
|
- django_static_volume:/var/www/static
|
|
- django_media_volume:/var/www/media
|
|
|