Skip to content

Commit

Permalink
Add Docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
mendesfabio committed Apr 16, 2021
1 parent df23ba9 commit d61f833
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.6

WORKDIR .

COPY . .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install -e ./
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx:1.15.8

RUN rm /etc/nginx/conf.d/default.conf
COPY default.conf /etc/nginx/conf.d/
16 changes: 16 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
@@ -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;
}

}

0 comments on commit d61f833

Please sign in to comment.