Skip to content

Commit

Permalink
add nginx webserver container
Browse files Browse the repository at this point in the history
  • Loading branch information
tngaspar committed Jul 17, 2022
1 parent 77603a2 commit 8952810
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
driver: local

networks:
default:
driver: bridge
4 changes: 4 additions & 0 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx

RUN rm /etc/nginx/conf.d/default.conf
COPY flask_app.conf /etc/nginx/conf.d/
9 changes: 9 additions & 0 deletions nginx/flask_app.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;
server_name $SERVER_NAME;

location / {
proxy_set_header Host $host;
proxy_pass http://flask:8000;
}
}

0 comments on commit 8952810

Please sign in to comment.