mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-25 20:40:36 +03:00
Setup prod settings
This commit is contained in:
parent
586052f671
commit
8e2b91402f
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = [
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ WORKDIR /result
|
|||
|
||||
COPY ./ ./
|
||||
RUN npm install
|
||||
ENV NODE_ENV production
|
||||
RUN npm run build
|
||||
|
||||
# ========= Server =======
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Constants
|
||||
const prod = {
|
||||
backend: 'http://dev.concept.ru:8000',
|
||||
// backend: 'http://localhost:8000',
|
||||
};
|
||||
|
||||
const dev = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user