diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..503e82c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.6 + +WORKDIR . + +COPY . . +RUN pip install --no-cache-dir -r requirements.txt +RUN pip install -e ./ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3cd44c9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3' + +services: + panel: + container_name: panel + restart: always + build: . + ports: + - "5100:5100" + command: panel serve --show apps/hatch.py --allow-websocket-origin=* --port=5100 + + nginx: + container_name: nginx + restart: always + build: ./nginx + ports: + - "80:80" + depends_on: + - panel diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..c9421e5 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.15.8 + +RUN rm /etc/nginx/conf.d/default.conf +COPY default.conf /etc/nginx/conf.d/ \ No newline at end of file diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..e0d4499 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,16 @@ +server { + + listen 80; + server_name tec-hatch-params; + + location /hatch { + proxy_pass http://app/hatch; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host:$server_port; + proxy_buffering off; + } + +} \ No newline at end of file