Skip to content

Commit

Permalink
Merge pull request #33 from jaljo/fix/readme
Browse files Browse the repository at this point in the history
[RFR] completed the readme
  • Loading branch information
jaljo authored Jul 2, 2020
2 parents 92c1b3f + 74d2624 commit 3447baf
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 3447baf

Please sign in to comment.