Refactor docker

This commit is contained in:
IRBorisov 2023-08-11 16:04:26 +03:00
parent 004664a53e
commit 32591263a6
2 changed files with 12 additions and 6 deletions

View File

@ -1,10 +1,12 @@
name: concept-portal
volumes: volumes:
postgres_volume: postgres_volume:
name: "postgresql-db" name: "portal-data"
django_static_volume: django_static_volume:
name: "static" name: "portal-static"
django_media_volume: django_media_volume:
name: "media" name: "portal-media"
networks: networks:
default: default:
@ -18,6 +20,7 @@ secrets:
services: services:
frontend: frontend:
container_name: portal-frontend
restart: always restart: always
depends_on: depends_on:
- backend - backend
@ -29,6 +32,7 @@ services:
backend: backend:
container_name: portal-backend
restart: always restart: always
depends_on: depends_on:
- postgresql-db - postgresql-db
@ -51,6 +55,7 @@ services:
postgresql-db: postgresql-db:
container_name: portal-db
restart: always restart: always
image: postgres:alpine image: postgres:alpine
secrets: secrets:
@ -63,6 +68,7 @@ services:
nginx: nginx:
container_name: portal-router
restart: always restart: always
build: build:
context: ./nginx context: ./nginx

View File

@ -1,8 +1,8 @@
# Application settings # Application settings
ALLOWED_HOSTS=localhost;portal.acconcept.ru;dev.concept.ru;mail.acconcept.ru; ALLOWED_HOSTS=localhost;portal.acconcept.ru;dev.concept.ru;mail.acconcept.ru
CSRF_TRUSTED_ORIGINS=https://dev.concept.ru:3000;https://localhost:3000;https://portal.acconcept.ru;https://portal.acconcept.ru:8081;https://mail.acconcept.ru:8081; CSRF_TRUSTED_ORIGINS=https://dev.concept.ru:3000;https://localhost:3000;https://portal.acconcept.ru;https://portal.acconcept.ru:8081;https://mail.acconcept.ru:8081
CORS_ALLOWED_ORIGINS=https://dev.concept.ru:3000;https://localhost:3000;https://portal.acconcept.ru;https://portal.acconcept.ru:8081;https://mail.acconcept.ru:8081; CORS_ALLOWED_ORIGINS=https://dev.concept.ru:3000;https://localhost:3000;https://portal.acconcept.ru;https://portal.acconcept.ru:8081;https://mail.acconcept.ru:8081
# File locations # File locations