diff --git a/README.MD b/README.MD index bb93cf1..5bc00ff 100644 --- a/README.MD +++ b/README.MD @@ -1,10 +1,27 @@ # Building the project -From inside the project directory, run the following commands: +First, `cp` to the project directory, then run the following commands: + +``` +$ make cp-env build install-deps start +``` + +Create the `blog_api` database and to run the migrations: + ``` -docker-compose build -docker-compose up +$ docker exec -it $(docker ps -q --filter name=api_mysql) mysql CREATE DATABASE blog_api; +$ docker exec -it $(docker ps -q --filter name=api_php) bin/console doctrine:migrations:migrate ``` -# Installing dependencies -`docker-compose exec php composer update` +You now have an API running on `http://localhost:8081`. + + +# Deploying to production + +First, create a release tag from the master branch on github, i.e. `v1.0`. + +Then, use the following command to deploy: + +``` +$ STAGE=prod IMAGE_TAG=v1.0 make build push remote-deploy +```