From 74d2624effa30bc321be3b9ae1b7bc26ba48b429 Mon Sep 17 00:00:00 2001 From: Joris Langlois Date: Wed, 24 Jun 2020 22:25:55 +0200 Subject: [PATCH] completed the readme --- README.MD | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) 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 +```