diff --git a/docker-compose.yml b/docker-compose.yml index 3a8f838..64db717 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -100,12 +100,23 @@ services: depends_on: - kibana - elasticsearch + + nginx: + build: ./nginx + container_name: nginx + #environment: + # - SERVER_NAME=${NGINX_SERVER_NAME} ports: - - "8000:8000" + - "80:80" + restart: always volumes: elasticsearch-data-volume: driver: local mongodata: - driver: local \ No newline at end of file + driver: local + +networks: + default: + driver: bridge \ No newline at end of file diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..27b7634 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx + +RUN rm /etc/nginx/conf.d/default.conf +COPY flask_app.conf /etc/nginx/conf.d/ \ No newline at end of file diff --git a/nginx/flask_app.conf b/nginx/flask_app.conf new file mode 100644 index 0000000..ce7d574 --- /dev/null +++ b/nginx/flask_app.conf @@ -0,0 +1,9 @@ +server { + listen 80; + server_name $SERVER_NAME; + + location / { + proxy_set_header Host $host; + proxy_pass http://flask:8000; + } +} \ No newline at end of file