- Install
- Docker Community Edition: https://docs.docker.com/install/ Here's a nice article if you're unfamiliar with Docker.
- Clone this repository
git clone https://github.com/thegirlcode/backend.git
- Create keyfile as auth/keys.js:
module.exports = {
googleID: 'googleSignInID',
googleSecret: 'googleSignInSecret',
facebookID: 'facebookSignInID',
facebookSecret: 'facebookSignInSecret'
};
- Build docker images
docker-compose build
- Start containers
docker-compose up -d mongo
You need to wait a few seconds for the mongodb daemon to start and then you can start the web container with
docker-compose up web
- Site will be at localhost:62442
Note: In order for Facebook and Google login to work on localhost, you will need to do the following:
-
Create a self-signed SSL certificate: https://github.com/FiloSottile/mkcert
-
Install and setup nginx: https://nginx.org
-
Use nginx to serve the self-signed certificate: https://stackoverflow.com/a/25857318
Or any other method of serving localhost:62442 as https://localhost. Site will be live at latter URL.
- You'll need to use nginx and certbot to create an SSL certificate and serve site over https://domain for production as Google and Facebook login will not work without it.