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,25 +36,8 @@ server {
|
||||
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;
|
||||
#proxy_redirect / /etherpad/;
|
||||
}
|
||||
|
||||
location / {
|
||||
include uwsgi_params;
|
||||
uwsgi_pass unix:///tmp/uwsgi.sock;
|
||||
|
||||
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:
|
||||
- ./etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt
|
||||
# restart: always
|
||||
fet2020:
|
||||
image: fet2020django
|
||||
build: .
|
||||
environment:
|
||||
HOST_NAME: andis.2020.fet.at
|
||||
DEBUG: "False"
|
||||
SECRET_KEY: arguiq3ebhnjo
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: hgu
|
||||
MYSQL_PORT: 3306
|
||||
depends_on:
|
||||
- mysql
|
||||
ports:
|
||||
- "8106:8080"
|
||||
volumes:
|
||||
- ./fet2020:/app
|
||||
- ./assets:/app/assets
|
||||
- ./etherpad:/app/etherpad
|
||||
- ./deployment/nginx.conf:/etc/nginx/conf.d/fet2020.conf
|
||||
# fet2020:
|
||||
# image: fet2020django
|
||||
# build: .
|
||||
# environment:
|
||||
# HOST_NAME: andis.2020.fet.at
|
||||
# DEBUG: "False"
|
||||
# SECRET_KEY: arguiq3ebhnjo
|
||||
# MYSQL_USER: user
|
||||
# MYSQL_PASSWORD: hgu
|
||||
# MYSQL_PORT: 3306
|
||||
# depends_on:
|
||||
# - mysql
|
||||
# ports:
|
||||
# - "8106:8080"
|
||||
# volumes:
|
||||
# - ./fet2020:/app
|
||||
# - ./assets:/app/assets
|
||||
# - ./etherpad:/app/etherpad
|
||||
# - ./deployment/nginx.conf:/etc/nginx/conf.d/fet2020.conf
|
||||
# restart: always
|
||||
theia:
|
||||
image: theiaide/theia-python:latest
|
||||
volumes:
|
||||
- .:/home/project
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./deployment/nginxdev.conf:/etc/nginx/conf.d/default.conf
|
||||
ports:
|
||||
- "8106:8080"
|
||||
volumes:
|
||||
ep-mysql-volume:
|
||||
mysql-volume:
|
||||
|
||||
Reference in New Issue
Block a user