Skip to content

Commit

Permalink
fix dumb attempts at local development :(
Browse files Browse the repository at this point in the history
  • Loading branch information
TangentFoxy committed Jan 29, 2017
1 parent 94cba6b commit 75a0383
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -6,5 +6,3 @@ guard13007com.service
dev.guard13007com.service
dhparams.pem
secret.moon
fullchain.pem
privkey.pem
2 changes: 0 additions & 2 deletions config.moon
Expand Up @@ -16,12 +16,10 @@ config "production", ->
port 8150
num_workers 4
code_cache "on"
ssl_path "/etc/letsencrypt/live/www.guard13007.com/"

config "development", ->
postgres ->
database "devguard13007com"
port 8155
num_workers 2
code_cache "off"
ssl_path "./"
16 changes: 8 additions & 8 deletions dev-local.sh → dev-import.sh
Expand Up @@ -2,21 +2,21 @@

set -o errexit # exit on error

echo "Assuming you have pre-requisites set up locally,"
echo "Assuming the main server was set up and running adjacent to this,"
echo " this will set up and run a dev environment."

openssl genrsa -des3 -out privkey.pem 1024 # I'm pretty sure we shouldn't be using 1024-bit keys...
openssl req -new -key privkey.pem -out server.csr
openssl rsa -in privkey.pem -out privkey.pem
openssl x509 -req -days 365 -in server.csr -signkey privkey.pem -out fullchain.pem
rm server.csr
cp ../dhparams.pem ./dhparams.pem
certbot-auto certonly --standalone -m paul.liverman.iii@gmail.com -d www.guard13007.com -d guard13007.com -d dev.guard13007.com

openssl dhparam -out dhparams.pem 2048
echo "Changing user to postgres..."
echo "Run 'createdb devguard13007com' and then 'exit' !"
echo "Run 'createdb devguard13007com'"
echo "And then 'psql devguard13007com < /path/to/devguard13007com.pgsql'"
echo "And finally 'exit'"
sudo -i -u postgres
cp secret.moon.example secret.moon
nano secret.moon # Put the info needed in there!
git submodule init
git submodule update
moonc .
lapis migrate development

Expand Down
4 changes: 2 additions & 2 deletions nginx.conf
Expand Up @@ -14,8 +14,8 @@ http {

server_tokens off;

ssl_certificate ${{SSL_PATH}}fullchain.pem;
ssl_certificate_key ${{SSL_PATH}}privkey.pem;
ssl_certificate /etc/letsencrypt/live/www.guard13007.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.guard13007.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
Expand Down

0 comments on commit 75a0383

Please sign in to comment.