From f7384527c7a57b5dedd2f10c3c36e925c54d2ed2 Mon Sep 17 00:00:00 2001 From: Abhinav Sarkar Date: Fri, 8 Jun 2018 15:51:29 +0000 Subject: [PATCH] Add nginx and routes wallabag through it --- .gitignore | 3 +++ docker-compose.yml | 14 ++++++++++++-- nginx-conf/wallabag.conf | 9 +++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 nginx-conf/wallabag.conf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..511f6d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +postgres-data +wallabag +nginx-log diff --git a/docker-compose.yml b/docker-compose.yml index 6753353..d08443f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,8 +19,6 @@ services: - SYMFONY__ENV__DOMAIN_NAME=http://space.abhinavsarkar.net depends_on: - db - ports: - - "80:80" volumes: - ./wallabag/images:/var/www/wallabag/web/assets/images db: @@ -30,3 +28,15 @@ services: POSTGRES_PASSWORD: example volumes: - ./postgres-data:/var/lib/postgresql/data + nginx: + image: nginx:1.15 + environment: + - NGINX_HOST=space.abhinavsarkar.net + - NGINX_PORT=80 + depends_on: + - wallabag + ports: + - "80:80" + volumes: + - ./nginx-conf:/etc/nginx/conf.d + - ./nginx-log:/var/log/nginx diff --git a/nginx-conf/wallabag.conf b/nginx-conf/wallabag.conf new file mode 100644 index 0000000..40a8e83 --- /dev/null +++ b/nginx-conf/wallabag.conf @@ -0,0 +1,9 @@ +server { + listen 80; + + proxy_set_header X-Real-IP $remote_addr; # pass on real client IP + + location / { + proxy_pass http://wallabag; + } +}