Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
11
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
8498e546
authored
Jun 09, 2020
by
Chif Gergő
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run asgi in a different container in production
parent
f1869ef5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
3 deletions
+29
-3
Dockerfile
+2
-2
Dockerfile.prod
+1
-1
config/nginx/recircle.conf
+12
-0
docker-compose.prod.yml
+14
-0
No files found.
Dockerfile
View file @
8498e546
...
...
@@ -9,8 +9,8 @@ EXPOSE 8000/tcp
COPY
Pipfile* .env ./
# This env variable needed to pipenv find .env file
ENV
PIPENV_DOTENV_LOCATION=/usr/cloud/portal/.env
# Install dependencies
RUN
pipenv install
# Install dependencies
RUN
pipenv install
-d
# Copy sources
COPY
./recircle ./recircle
# Set working dir where the manage.py found
...
...
Dockerfile.prod
View file @
8498e546
...
...
@@ -10,7 +10,7 @@ COPY Pipfile* .env ./
# This env variable needed to pipenv find .env file
ENV PIPENV_DOTENV_LOCATION=/usr/cloud/portal/.env
# Install dependencies
RUN pipenv install
-d
RUN pipenv install
# Copy sources
COPY ./recircle ./recircle
# Set working dir where the manage.py found
...
...
config/nginx/recircle.conf
View file @
8498e546
...
...
@@ -2,6 +2,10 @@ upstream recircle {
server
backend
:
8000
;
}
upstream
wsbackend
{
server
daphne
-
server
:
8001
;
}
server
{
listen
80
;
...
...
@@ -20,6 +24,14 @@ server {
proxy_redirect
off
;
}
location
/
ws
/ {
proxy_pass
http
://
wsbackend
;
proxy_http_version
1
.
1
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
"Upgrade"
;
proxy_set_header
Host
$
host
;
}
location
/
static
/ {
alias
/
static
/;
...
...
docker-compose.prod.yml
View file @
8498e546
...
...
@@ -54,5 +54,19 @@ services:
-
db
-
redis
daphne-server
:
build
:
context
:
.
dockerfile
:
./Dockerfile.prod
command
:
pipenv run daphne -b 0.0.0.0 -p 8001 recircle.asgi:application
expose
:
-
"
8001"
networks
:
-
backend
depends_on
:
-
backend
-
db
-
redis
networks
:
backend
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment