-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from jaljo/fix/readme
[RFR] completed the readme
- Loading branch information
Showing
1 changed file
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |