Add reverse proxy

This commit is contained in:
Patrick Jentsch 2020-01-09 15:13:47 +01:00
parent 44054a51c3
commit 0a388fe4b2
3 changed files with 16 additions and 26 deletions

View File

@ -1,18 +1,18 @@
version: '3' version: '3'
services: services:
# traefik: nginx-proxy:
# command: depends_on:
# - "--api.insecure=true" - web
# - "--providers.docker=true" deploy:
# - "--providers.docker.exposedbydefault=false" placement:
# - "--entrypoints.nopaque.address=:5000" constraints:
# image: traefik:2.0 - node.role == manager
# ports: ports:
# - 5000:5000 - "80:80"
# - 9090:8080 image: jwilder/nginx-proxy:latest
# volumes: volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/tmp/docker.sock:ro
web: web:
depends_on: depends_on:
- db - db
@ -21,18 +21,9 @@ services:
placement: placement:
constraints: constraints:
- node.role == manager - node.role == manager
environment:
- VIRTUAL_HOST=nopaque.localhost
env_file: nopaque.env env_file: nopaque.env
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.nopaque.entrypoints=nopaque"
# - "traefik.http.routers.nopaque.rule=Host(`nopaque.localhost`)"
# # Use sticky sessions for load balancing
# # Socket.IO is not compatible with cookie sticky sessions which are the
# # only available option in traefik
# - "traefik.http.services.web-opaque.loadbalancer.sticky=true"
# - "traefik.http.services.web-opaque.loadbalancer.sticky.cookie.httpOnly=true"
ports:
- "5000:5000"
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development
volumes: volumes:
- /mnt/nopaque:/mnt/nopaque - /mnt/nopaque:/mnt/nopaque

View File

@ -6,9 +6,8 @@ echo "Waiting for redis..."
wait-for-it redis:6379 --strict --timeout=0 wait-for-it redis:6379 --strict --timeout=0
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
venv/bin/python -u nopaque.py venv/bin/python nopaque.py
elif [ $1 == "flask" ]; then elif [ $1 == "flask" ]; then
echo "$@"
venv/bin/python -m $@ venv/bin/python -m $@
else else
echo "Unknown command" echo "Unknown command"

View File

@ -1,4 +1,4 @@
### Database ### ### PostgreSQL ###
POSTGRES_DB_NAME= POSTGRES_DB_NAME=
POSTGRES_USER= POSTGRES_USER=
POSTGRES_PASSWORD= POSTGRES_PASSWORD=