-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adiciona o pREST como uma possibilidade de API ao serviço #168
Merged
Merged
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
474ac4e
Adds pREST configuration on docker-compose
vmesel e3c8d43
Adiciona o pREST como uma possibilidade de consumo do banco para cria…
vmesel c529f21
Update docker-compose.yml
vmesel 38b0886
Merge branch 'main' of github.com:vmesel/minha-receita into feature/p…
vmesel b8eb575
Fixes docker-compose file and adds settings to restrict writing acces…
vmesel a49b69c
Fixes docker-compose file and adds settings to restrict writing acces…
vmesel 086424f
Merge branch 'feature/prestd-configuration' of github.com:vmesel/minh…
vmesel 04054d8
Update docker-compose.yml
vmesel df2cc5e
Renaming prest config file
vmesel 2d303ae
Merge branch 'feature/prestd-configuration' of github.com:vmesel/minh…
vmesel 5c77dd7
Update api/config/prest.toml
vmesel 2d72742
Fixed pREST docker-image version using SHA256 to latest available
vmesel f2ad588
Removes dependency on postgres from minha-receita container
vmesel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -9,6 +9,9 @@ services: | |
- .env | ||
volumes: | ||
- ./data:/mnt/data | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
|
||
postgres: | ||
image: postgres:14-alpine | ||
|
@@ -32,3 +35,28 @@ services: | |
- 5555:5432 | ||
environment: *credentials | ||
command: ["postgres", "-c", "log_statement=all"] | ||
|
||
prest: | ||
image: prest/prest:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Não seria melhor (no sentido de previsibilidade e reprodutibilidade) especificar uma versão? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seria! |
||
ports: | ||
- 8081:8081 | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
|
||
environment: | ||
- PREST_DEBUG=true | ||
vmesel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- PREST_AUTH_ENABLED=false | ||
vmesel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- PREST_PG_HOST=postgres | ||
- PREST_PG_USER=minhareceita | ||
- PREST_PG_PASS=minhareceita | ||
- PREST_PG_DATABASE=minhareceita | ||
- PREST_PG_PORT=5432 | ||
- PREST_SSL_MODE=disable | ||
- PREST_CACHE_ENABLED=false | ||
- PREST_CACHE=false | ||
vmesel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- PREST_HTTP_PORT=8081 | ||
- PREST_QUERIES_LOCATION=/prest/data/queries/ | ||
- PREST_CONF=/prest/data/config/prest.toml | ||
volumes: | ||
- ./prest/:/prest/data/ | ||
vmesel marked this conversation as resolved.
Show resolved
Hide resolved
|
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[access] | ||
restrict = true | ||
|
||
[[access.tables]] | ||
name = "cnpj" | ||
permissions = ["read"] | ||
|
||
[[access.tables]] | ||
name = "meta" | ||
permissions = ["write"] | ||
vmesel marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eu não incluiria isso, como justificado em outro PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cuducos se o banco não tiver subido antes do pREST, ele falha na conexão. Como que a gente faz sem condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se o banco tem que subir antes do serviço
prest
esse bloco tem que estar no serviçoprest
e não no serviçominha-receita
(e ele já está, linhas 43-45).