Skip to content

Commit

Permalink
Trying to serve static files in /var/www from nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
vr2262 committed Jan 20, 2016
1 parent 0dafe73 commit d65ec65
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ RUN cp -a /tmp/node_modules /dokomo/
ADD . /dokomo/
RUN pip install -r requirements.txt
RUN nodejs node_modules/gulp/bin/gulp.js build
RUN mv /dokomo/dokomoforms/static/dist /var/www
EXPOSE 8888
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ nginx:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt:/etc/letsencrypt
- /tmp:/tmp
volumes_from:
- webapp
webapp:
image: "selcolumbia/dokomoforms:0.2.9"
command: bash -c "./docker-wait-for-postgres.sh db && head -c 24 /dev/urandom > cookie_secret && python webapp.py"
links:
- "db:db"
volumes:
- ./local_config.py:/dokomo/local_config.py
- /var/www
db:
image: "mdillon/postgis:9.4"
environment:
Expand Down
4 changes: 4 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ http {
root /tmp/letsencrypt-auto;
}

location ^~ /static/ {
root /var/www;
}

location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
Expand Down

0 comments on commit d65ec65

Please sign in to comment.