Skip to content

Commit

Permalink
completed the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Joris Langlois committed Jun 24, 2020
1 parent 92c1b3f commit 74d2624
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions README.MD
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 74d2624

Please sign in to comment.