The project "EK-Blog" enables authors to write, edit and publish their articles.
Part I To start the project to local:
1. Rename .env.dist file to .env
3. $ npm run migration:run
Part II To start the project using the docker container:
1. Rename .env.dist file to .env
2. in file .env uncomment section --Postgers Docker-- and comment --Postgers local--.
3. in docker-compose.yml change ports to 5433:5432.
6. $ npm run migration:run
7. $ npm run start:dev
or npm run start:prod
Part III To deploy the project on Heroku link
1. Create a new app on Heroku
2. In the project tab on Heroku "overview" install the add-on Heroku-Postgres
3. In the project tab on Heroku "overview" install the add-on Heroku-Redis
4. Create the Procfile in your project root directory and paste the following line into it: $ web: npm run start:prod
5. Follow the steps to deploy the project to Heroku in the "Deploy" tab
6. In the Heroku app go to the "settings" tab of the project,
click on the button "Reveal Config Vars"
add the following keys and values to the fields:
DATABASE_URL: we take in the project on Heroku, tab resources, Heroku Postgres, settings, button View Credentials, copy the entire URI line
TYPEORM_CONNECTION: postgres
TYPEORM_URL: we take in the project on Heroku, tab resources, Heroku Postgres, settings, button View Credentials, copy the entire URI line
TYPEORM_DRIVER_EXTRA: {"ssl":true}
NODE_TLS_REJECT_UNAUTHORIZED: 0
SMTP_SUPPORT_PASSWORD=generate a password following this instruction link
REDIS_HOST=ec2-52-211-224-65.eu-west-1.compute.amazonaws.com
REDIS_PASSWORD=we take in the project on Heroku, tab resources, Heroku Redis, settings, button View Credentials, copy the entire password line
REDIS_URL=we take in the project on Heroku, tab resources, Heroku Redis, settings, button View Credentials, copy the entire URI line
7. Add migrations to Postgres on Heroku:
8. Run the command $ git push heroku master