Skip to content

Commit

Permalink
chore(dev): Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Aug 18, 2023
1 parent 795c2bc commit 1b9cfc1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@ IMAGE_NAME=opencodeco/rinha-de-backend:2023-q3

default: build push

.env:
cp .env.example .env

vendor/autoload.php:
docker compose exec app composer install

.PHONY: build
build:
docker build -t $(IMAGE_NAME) .

.PHONY: push
push:
docker push $(IMAGE_NAME)

.PHONY: up
up: .env
docker compose up -d

.PHONY: test
test: vendor/autoload.php
docker compose exec app composer test
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,12 @@ PR da participação: [github.com/zanfranceschi/rinha-de-backend-2023-q3/pull/79

### Primeiros passos

#### Copiar o arquivo de variávies de ambiente
```shell
cp .env.example .env
```

#### Subir a aplicação
```shell
docker compose up
```

#### Instalar dependências
```shell
docker compose exec app composer install
make up
```

#### Executar os testes
```shell
docker compose exec app composer test
make test
```

0 comments on commit 1b9cfc1

Please sign in to comment.