Error on open /admin #219
-
I got the following error when accessing the "/admin/auth/login" endpoint locally. I'm testing Fief with docker-compose locally, before installing in an Amazon EC2 instance. Trace
docker-compose.yml:version: "3"
services:
fief-server:
image: ghcr.io/fief-dev/fief:latest
command: fief run-server --port 80
ports:
- 8000:80
env_file:
- .env
fief-worker:
image: ghcr.io/fief-dev/fief:latest
command: fief run-worker -p 1 -t 1
env_file:
- .env
postgres:
image: postgres:alpine
ports:
- "5433:5432"
environment:
- POSTGRES_PASSWORD=fief
- POSTGRES_USER=fief
- POSTGRES_DB=fief
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
image: redis:alpine
command: redis-server --save 60 1 --loglevel warning
volumes:
- redis-data:/data
volumes:
redis-data:
postgres-data: .env
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hail, @csmaniottojr 👋 I've noticed you shared secret values: For your security, I've taken the liberty to replace them with dummy values. |
Beta Was this translation helpful? Give feedback.
-
Hail, @csmaniottojr 👋 Welcome to Fief's kingdom! Our team will get back to you very soon to help. In the meantime, take a minute to star our repository ⭐️ Farewell! |
Beta Was this translation helpful? Give feedback.
-
There's a problem with the port definition: the environment variable It's a bit hard to follow, because the port is different inside and outside the container. I would suggest to be consistent everywhere, if that's possible for you (e.g. 8000 everywhere or 80 everywhere). |
Beta Was this translation helpful? Give feedback.
There's a problem with the port definition: the environment variable
PORT
and the port on which you open the server must match. So, if the server command isfief run-server --port 80
, then you should havePORT=80
in.env
.It's a bit hard to follow, because the port is different inside and outside the container. I would suggest to be consistent everywhere, if that's possible for you (e.g. 8000 everywhere or 80 everywhere).