Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation how to use Docker-Compose #3

Open
DenisCarriere opened this issue Jul 13, 2017 · 5 comments
Open

Documentation how to use Docker-Compose #3

DenisCarriere opened this issue Jul 13, 2017 · 5 comments

Comments

@DenisCarriere
Copy link
Member

Try out the new docker-compose set up and see if you have any issues setting up the server.

Should be as easy as:

$ docker-compose build
$ docker-compose up

Updated the README.md with these instructions.

CC: @devisscher @phucduong86

@devisscher
Copy link
Member

devisscher commented Jul 13, 2017

Works!

1 thing though and I think it's a config issue on my end. I added NODE_ENV=development to my .env file. It was running as production.

Otherwise this is great.

@DenisCarriere Are we still using SSL? This is important in production because iOS won't make http requests to unsecure hosts.

EDIT: Just saw the heroku app is SSL. 👌

@DenisCarriere
Copy link
Member Author

DenisCarriere commented Jul 13, 2017

I added NODE_ENV=development to my .env file. It was running as production.

Only thing I changed that might do that is if you don't provider DB_USER then it fallbacks to MongoDB development (https://github.com/YOWCT/pothole_webserver/blob/master/models/db.js#L11)

Are we still using SSL? This is important in production because iOS won't make http requests to unsecure hosts.

Yes, everything will be over SSL / HTTP2, however all that stuff should be handled on the server using Nginx + Letsencrypt.

Here's a server we've hosted with this set up:
https://data.osmcanada.com/
Nginx Configurations

@DenisCarriere
Copy link
Member Author

Next Meetup/get together we can talk about this set up.

In a nutshell, your web server simple needs to host over localhost on a specific port and Nginx does all the SSL handling.

@devisscher
Copy link
Member

devisscher commented Jul 13, 2017

In a nutshell, your web server simple needs to host over localhost on a specific port and Nginx does all the SSL handling.

Ok, I have set up nginx and letsencrypt before. It's running here. https://ott311.esdev.xyz but certificate is expired lol.

@DenisCarriere
Copy link
Member Author

Lol! :P certificate expiring is always fun.

I usually set up a shell script that updates LetsEncrypt as a cronjob.

/root/autorenew.sh

#!/bin/bash
service nginx stop
/root/certbot/certbot-auto renew
service nginx start

/etc/crontab

10 6    * * *   root    /root/autorenew.sh >> /var/log/autorenew.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants