Skip to content

Commit

Permalink
chore(dev): Dockerized application
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Aug 18, 2023
1 parent ebd4690 commit bbd06f0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,22 @@ Repositório do projeto back-end da equipe OpenCodeCo.
> O *upstream* com a participação deste projeto está na branch `main`.
PR da participação: [github.com/zanfranceschi/rinha-de-backend-2023-q3/pull/79](https://github.com/zanfranceschi/rinha-de-backend-2023-q3/pull/79).

## Contribuindo

### Primeiros passos

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

1. Subir a aplicação com:
```shell
docker compose up
```

2. Executar os testes com:
```shell
docker compose exec app compose test
```
16 changes: 14 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@ services:
image: mysql:8.1
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: opencodeco
MYSQL_DATABASE: opencodeco
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
volumes:
- ./migrations.sql:/docker-entrypoint-initdb.d/migrations.sql
ports:
- 3306:3306

app:
container_name: rinha-de-backend-app
image: rinha-de-backend-app
build:
context: .
environment:
DB_HOST: db
volumes:
- ./:/opt/www
ports:
- 9501:9501

networks:
default:
name: rinha-de-backend

0 comments on commit bbd06f0

Please sign in to comment.