Setup prod settings

This commit is contained in:
IRBorisov 2023-08-08 16:14:58 +03:00
parent 586052f671
commit 8e2b91402f
5 changed files with 9 additions and 13 deletions

View File

@ -1,10 +1,10 @@
volumes:
postgres_volume:
name: "portal-db"
name: "postgresql-db"
django_static_volume:
name: "portal-static"
name: "static"
django_media_volume:
name: "portal-media"
name: "media"
networks:
default:
@ -19,7 +19,6 @@ secrets:
services:
frontend:
restart: always
container_name: "portal-front"
depends_on:
- backend
build:
@ -31,7 +30,6 @@ services:
backend:
restart: always
container_name: "portal-back"
depends_on:
- postgresql-db
- nginx
@ -55,7 +53,6 @@ services:
postgresql-db:
restart: always
container_name: "portal-db"
image: postgres:alpine
secrets:
- db_password
@ -68,7 +65,6 @@ services:
nginx:
restart: always
container_name: "portal-nginx"
build:
context: ./nginx
ports:

View File

@ -1,12 +1,12 @@
upstream innerdjango {
server backend:8000;
server back:8000;
# `backend` is the service's name in docker-compose.yml,
# The `innerdjango` is the name of upstream, used by nginx below.
}
server {
listen 80;
server_name portal.acconcept.ru;
server_name localhost dev.concept.ru www.dev.concept.ru portal.acconcept.ru www.portal.acconcept.ru;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;

View File

@ -82,9 +82,9 @@ MIDDLEWARE = [
]
ROOT_URLCONF = 'project.urls'
LOGIN_URL = '/accounts/login/'
LOGIN_REDIRECT_URL = '/home'
LOGOUT_REDIRECT_URL = '/home'
LOGIN_URL = '/admin/login/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'
TEMPLATES = [
{

View File

@ -11,6 +11,7 @@ WORKDIR /result
COPY ./ ./
RUN npm install
ENV NODE_ENV production
RUN npm run build
# ========= Server =======

View File

@ -1,7 +1,6 @@
// Constants
const prod = {
backend: 'http://dev.concept.ru:8000',
// backend: 'http://localhost:8000',
};
const dev = {