Skip to content
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

APP_SECRET_KEY error #13

Closed
viriatusX opened this issue Jul 7, 2023 · 8 comments
Closed

APP_SECRET_KEY error #13

viriatusX opened this issue Jul 7, 2023 · 8 comments

Comments

@viriatusX
Copy link

Hi,
I am trying to get the docker up, and everything is correct, but the Worker is NOT. It shows this error. I have specified a value in the .env file.

Captura de pantalla 2023-07-07 a las 11 54 35

Thanks!

@unmade
Copy link
Owner

unmade commented Jul 9, 2023

Hey,

Can you please provide a bit more details, like what command you ran, whether you made changes to .shelf-back.env, docker-compose.yml, etc..

@viriatusX
Copy link
Author

viriatusX commented Jul 10, 2023

Hey,

Can you please provide a bit more details, like what command you ran, whether you made changes to .shelf-back.env, docker-compose.yml, etc..

Hi!
I am running in Unraid
My docker-compose.yml

services:
shelf-back:
image: fdooch/shelf-back:0.1.0-alpha.12
env_file:
- ./.shelf-back.env
environment:
- SHELF_SUPERUSER_USERNAME=admin
- SHELF_SUPERUSER_PASSWORD=root
volumes:
- /mnt/user/appdata/shelf/certs:/usr/src/shelf-back/certs
- /mnt/user/appdata/shelfdata:/usr/src/shelf-data
ports:
- "6777:80"
depends_on:
- redis
- edgedb

shelf-worker:
image: fdooch/shelf-back:0.1.0-alpha.12
volumes:
- /mnt/user/appdata/shelf/certs:/usr/src/shelf-back/certs
- /mnt/user/appdata/shelfdata:/usr/src/shelf-data
command: ["celery", "-A", "app.tasks", "worker", "-l", "INFO"]
depends_on:
- edgedb
- redis

shelf-front:
image: fdooch/shelf-front:0.1.0-alpha.13
env_file:
- ./.shelf-back.env
environment:
- API_BASE_URL=http://192.168.1.165:8000
ports:
- "6778:80"
depends_on:
- shelf-back

edgedb:
image: edgedb/edgedb:2.5
environment:
- EDGEDB_SERVER_USER=edgedb
- EDGEDB_PASSWORD=root
- EDGEDB_SERVER_TLS_CERT_FILE=/certs/edbtlscert.dev.pem
- EDGEDB_SERVER_TLS_KEY_FILE=/certs/edbprivkey.dev.pem
volumes:
- dbvolume:/var/lib/edgedb/data
- /mnt/user/appdata/shelf/certs:/certs
ports:
- "5656:5656"

redis:
image: redis:alpine
ports:
- "6279:6379"

volumes:
dbvolume: {}

My .shelf-back.env

Captura de pantalla 2023-07-10 a las 19 32 12

And all containers are lifted correctly but the shelf-worker show the error list above.

@unmade
Copy link
Owner

unmade commented Jul 10, 2023

Oh, it seems shelf-worker config missing the env_file attribute. All you need to do is to add it (like in shelf-back):

    env_file:
      - ./.shelf-back.env

Please, let me know if that solves the issue!

@viriatusX
Copy link
Author

viriatusX commented Jul 10, 2023

Oh, it seems shelf-worker config missing the env_file attribute. All you need to do is to add it (like in shelf-back):

    env_file:
      - ./.shelf-back.env

Please, let me know if that solves the issue!

Thanks for your quickly response. Now, the application starts but I seems not "connect" correctly with DB. I can't access neither create new account.

The logs shows:
Captura de pantalla 2023-07-10 a las 20 55 55

Captura de pantalla 2023-07-10 a las 20 56 09

CleanShot 2023-07-10 at 21 01 23

@unmade
Copy link
Owner

unmade commented Jul 10, 2023

To be honest I don't know what's wrong with EdgeDB container. I know some of the issue can be related to the architecture. Are you running on x86_64 or arm64 (raspberry pi)? If you're running on arm64, then most likely that is the case.

Alternatively, you can try to remove containers and related volumes and create everything from scratch. Sorry for such inconvenience

@viriatusX
Copy link
Author

viriatusX commented Jul 11, 2023

To be honest I don't know what's wrong with EdgeDB container. I know some of the issue can be related to the architecture. Are you running on x86_64 or arm64 (raspberry pi)? If you're running on arm64, then most likely that is the case.

Alternatively, you can try to remove containers and related volumes and create everything from scratch. Sorry for such inconvenience

Thanks for your reply. I'm running on x86 (AMD64) platform, not ARM.
When I try to login it, the Chrome shows this error 405:
It seems that it is not edgedb's error.
In CORS I have specified "*" and in API_BASE_URL=http://192.168.1.165:6778 (6778 in my case since port 8000 is busy).

Captura de pantalla 2023-07-11 a las 19 41 56

@unmade
Copy link
Owner

unmade commented Jul 12, 2023

Sorry that it took me a bit long to reply.

Based on docker-compose you've provided, I think the API_BASE_URL should be set to http://192.168.1.165:6777. The port 6778 points to the frontend server, hence the 405 error code. But the 6777 actually points to the backend

@viriatusX
Copy link
Author

Solved!!! Thanks!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants