Domain setup and archive message

This commit is contained in:
Oleg Lavrovsky 2018-06-02 14:37:25 +02:00
parent 0626be3997
commit 9ebaa1b7cf
3 changed files with 26 additions and 6 deletions

View file

@ -9,7 +9,7 @@ This project is open source under the [MIT License](LICENSE.md).
## Development environment ## Development environment
The easiest way to set up your machine would be to use [Vagrant](https://vagrantup.com), then in the project folder in the terminal type: `vagrant up`. Then when it is ready, follow instructions for *Database setup*. The easiest way to set up your machine would be to use [Vagrant](https://vagrantup.com), then in the project folder in the terminal type: `vagrant up`. Then when it is ready, follow instructions for *publichealth/static/org/archive-message.htmlDatabase setup*.
To set up a full development environment, follow all these instructions. To set up a full development environment, follow all these instructions.
@ -21,7 +21,7 @@ If not using Vagrant, you will need to have Ruby and SASS installed on your syst
sudo apt-get install ruby-sass sudo apt-get install ruby-sass
``` ```
Make sure a recent version of node.js (we recommend using [nave.sh](https://github.com/isaacs/nave)), then: Make sure a recent version of node.js (we recommend using [nave.sh](https://gipublichealth/static/org/archive-message.htmlthub.com/isaacs/nave)), then:
``` ```
npm install -g bower grunt-cli npm install -g bower grunt-cli

View file

@ -7,12 +7,23 @@ server {
server_name www-old.{{ domain }}; server_name www-old.{{ domain }};
index index.html index.htm; index index.html index.htm;
root {{ archive_dir }}; root {{ archive_dir }};
add_after_body /archive-message.html;
location = /archive-message.html {
root {{ release_dir }}/static/org/;
}
location / { location / {
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
} }
add_after_body /archive-message.html; # Enable secure site support
location = /archive-message.html { listen [::]:443;
root {{ release_dir }}/static/org/archive-message.html; listen 443 ssl;
ssl on;
ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} }
} }
@ -25,4 +36,11 @@ server {
location / { location / {
return 301 $scheme://sph17.organizers-congress.org; return 301 $scheme://sph17.organizers-congress.org;
} }
# Enable secure site support
listen [::]:443;
listen 443 ssl;
ssl on;
ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
} }

View file

@ -4,7 +4,7 @@
</h3> </h3>
<style> <style>
.archive-message { .archive-message {
padding: 2em; padding: 1em;
background: red; background: red;
color: white; color: white;
position: fixed; position: fixed;
@ -12,6 +12,8 @@
display: block; display: block;
width: 100%; width: 100%;
left: 0px; left: 0px;
z-index: 10000;
margin: 0px;
} }
.archive-message a { .archive-message a {
border-radius: 5px; border-radius: 5px;