From 5c75422c6f4133f0b27b66b79e19aaddffe8a223 Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Sat, 11 Apr 2020 15:08:34 +0300 Subject: [PATCH] Update docs and add nginx redirect --- DEVELOPMENT.md | 1 + ext/nginx.conf.d/staging.conf.template | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index c7004d7..c7a29d7 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -42,6 +42,7 @@ There are some unresolved issues to setup dev env. 1. Make sure tmp, tmp/sockets, tmp/pids and log exist. 1. Make sure docker has access to its dirs. You might have to `sudo chown -R 999:999 for` for `db/data` if you have permission issues with docker. +1. You might have to run migrations manually. ## Tips diff --git a/ext/nginx.conf.d/staging.conf.template b/ext/nginx.conf.d/staging.conf.template index 7de6a09..06c2c05 100644 --- a/ext/nginx.conf.d/staging.conf.template +++ b/ext/nginx.conf.d/staging.conf.template @@ -23,16 +23,19 @@ upstream puma { #} # HTTP -> HTTPS redirect -server { - listen *:$STAGING_PORT; - # server_name $STAGING_DOMAIN; - return 301 https://$STAGING_DOMAIN$request_uri; -} +#server { +# listen *:$STAGING_PORT; +# server_name $STAGING_DOMAIN; +# return 301 https://$STAGING_DOMAIN$request_uri; +#} server { #listen *:$STAGING_PORT default_server; listen *:$STAGING_PORT_SSL ssl default_server; + # Redirect to HTTPS + error_page 497 https://$host:$server_port$request_uri; + ## domain_agnostic staging # server_name $STAGING_DOMAIN; root $APP_PATH_PUBLIC;