Add nginx and routes wallabag through it

master
Abhinav Sarkar 2018-06-08 15:51:29 +00:00
parent 52e3cb24f6
commit f7384527c7
3 changed files with 24 additions and 2 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
postgres-data
wallabag
nginx-log

View File

@ -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

9
nginx-conf/wallabag.conf Normal file
View File

@ -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;
}
}