prest: Documentation quick start scaffold not working for me
when trying to use the application via docker-compose I can’t create the minimum structure for jwt
Command:
docker-compose exec prest prestd migrate up auth --url "postgres://prest:prest@postgres:5432/prest?sslmode=disable&sslcert=&sslkey=&sslrootcert="
Console messages:
2023/01/31 21:16:37 [warning] file './prest.toml' not found, falling back to default settings
2023/01/31 21:16:37 [warning] read env config error: Config File "prest" Not Found in "[/app]"
2023/01/31 21:16:37 [warning]
You are using v1 of prestd configs, please migrate to v2.
v1 will be deprecated soon.
View more at https://docs.prestd.com/prestd/deployment/server-configuration
pq: syntax error at or near "%"Error: pq: syntax error at or near "%"
Usage:
prestd migrate up auth [flags]
Flags:
-h, --help help for auth
Global Flags:
--path string Migrations directory
--url string Database driver url (default "postgres://prest:prest@postgres:5432/prest?sslmode=disable&sslcert=&sslkey=&sslrootcert=")
pq: syntax error at or near "%"
I’m going to do a simple test, I don’t want to make several configurations in files and etc.
Docker compose file:
version: "3"
services:
postgres:
image: postgres
volumes:
- "./data/postgres:/var/lib/postgresql/data"
environment:
- POSTGRES_USER=prest
- POSTGRES_DB=prest
- POSTGRES_PASSWORD=prest
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "prest"]
interval: 30s
retries: 3
prest:
# use latest build - analyze the risk of using this version in production
image: prest/prest:v1
links:
- "postgres:postgres"
environment:
- PREST_DEBUG=true
- PREST_AUTH_ENABLED=false
- PREST_PG_HOST=postgres
- PREST_PG_USER=prest
- PREST_PG_PASS=prest
- PREST_PG_DATABASE=prest
- PREST_PG_PORT=5432
- PREST_SSL_MODE=disable
- PREST_CACHE_ENABLED=false
- PREST_CACHE=false
depends_on:
postgres:
condition: service_healthy
ports:
- "3000:3000"
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (10 by maintainers)
Update: v1.1 workable.
@arxdsilva generate new version pls
@avelino I’ve created a branch to work on this but havent solved yet, will open a PR to fix the problems that I already found.
he managed to follow the tutorial with version
v1.1
(generated 1 year ago), is there any bug from there to herewe need to revise the tutorial for the new version