add nginx dev and dev docker
This commit is contained in:
9
.workspace.theia-workspace
Normal file
9
.workspace.theia-workspace
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "fet2020"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {}
|
||||||
|
}
|
||||||
@@ -36,24 +36,7 @@ server {
|
|||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
}
|
}
|
||||||
location /dev {
|
|
||||||
rewrite_log on;
|
|
||||||
rewrite /dev/(.*) /$1 break;
|
|
||||||
rewrite ^/dev$ /dev/ permanent;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header Proxy "";
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "Upgrade";
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarde-Proto $scheme;
|
|
||||||
|
|
||||||
|
|
||||||
proxy_buffering off;
|
|
||||||
|
|
||||||
proxy_pass http://theia:3000;
|
|
||||||
#proxy_redirect / /etherpad/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
|
|||||||
67
deployment/nginxdev.conf
Normal file
67
deployment/nginxdev.conf
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
error_log /var/log/nginx/error.log notice;
|
||||||
|
rewrite_log on;
|
||||||
|
resolver 127.0.0.11 valid=30s;
|
||||||
|
set $theia theia;
|
||||||
|
set $flaskfetfotos "flaskfetfotos:8080";
|
||||||
|
set $etherpad "etherpad:9001";
|
||||||
|
location /fotos {
|
||||||
|
proxy_ssl_server_name on;
|
||||||
|
proxy_ssl_verify off;
|
||||||
|
|
||||||
|
proxy_pass http://$flaskfetfotos;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
# proxy_set_header REMOTE-USER $http_REMOTE_USER;
|
||||||
|
# proxy_set_header X-Forwarded-User $http_REMOTE_USER;
|
||||||
|
# proxy_set_header x-forwarded-user $http_REMOTE_USER;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
location /etherpad {
|
||||||
|
|
||||||
|
rewrite /etherpad/(.*) /$1 break;
|
||||||
|
rewrite ^/etherpad$ /etherpad/ permanent;
|
||||||
|
|
||||||
|
proxy_pass http://$etherpad;
|
||||||
|
proxy_redirect / /etherpad/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
}
|
||||||
|
location /dev {
|
||||||
|
rewrite_log on;
|
||||||
|
rewrite /dev/(.*) /$1 break;
|
||||||
|
rewrite ^/dev$ /dev/ permanent;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Proxy "";
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarde-Proto $scheme;
|
||||||
|
|
||||||
|
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_pass http://$theia:3000;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Proxy "";
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarde-Proto $scheme;
|
||||||
|
|
||||||
|
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
proxy_pass http://$theia:8000;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -50,30 +50,36 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt
|
- ./etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt
|
||||||
# restart: always
|
# restart: always
|
||||||
fet2020:
|
# fet2020:
|
||||||
image: fet2020django
|
# image: fet2020django
|
||||||
build: .
|
# build: .
|
||||||
environment:
|
# environment:
|
||||||
HOST_NAME: andis.2020.fet.at
|
# HOST_NAME: andis.2020.fet.at
|
||||||
DEBUG: "False"
|
# DEBUG: "False"
|
||||||
SECRET_KEY: arguiq3ebhnjo
|
# SECRET_KEY: arguiq3ebhnjo
|
||||||
MYSQL_USER: user
|
# MYSQL_USER: user
|
||||||
MYSQL_PASSWORD: hgu
|
# MYSQL_PASSWORD: hgu
|
||||||
MYSQL_PORT: 3306
|
# MYSQL_PORT: 3306
|
||||||
depends_on:
|
# depends_on:
|
||||||
- mysql
|
# - mysql
|
||||||
ports:
|
# ports:
|
||||||
- "8106:8080"
|
# - "8106:8080"
|
||||||
volumes:
|
# volumes:
|
||||||
- ./fet2020:/app
|
# - ./fet2020:/app
|
||||||
- ./assets:/app/assets
|
# - ./assets:/app/assets
|
||||||
- ./etherpad:/app/etherpad
|
# - ./etherpad:/app/etherpad
|
||||||
- ./deployment/nginx.conf:/etc/nginx/conf.d/fet2020.conf
|
# - ./deployment/nginx.conf:/etc/nginx/conf.d/fet2020.conf
|
||||||
# restart: always
|
# restart: always
|
||||||
theia:
|
theia:
|
||||||
image: theiaide/theia-python:latest
|
image: theiaide/theia-python:latest
|
||||||
volumes:
|
volumes:
|
||||||
- .:/home/project
|
- .:/home/project
|
||||||
|
nginx:
|
||||||
|
image: nginx:alpine
|
||||||
|
volumes:
|
||||||
|
- ./deployment/nginxdev.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
ports:
|
||||||
|
- "8106:8080"
|
||||||
volumes:
|
volumes:
|
||||||
ep-mysql-volume:
|
ep-mysql-volume:
|
||||||
mysql-volume:
|
mysql-volume:
|
||||||
|
|||||||
Reference in New Issue
Block a user