-
Notifications
You must be signed in to change notification settings - Fork 8
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
Problem deploying docker with APP_KEY #57
Comments
When you add the |
Apologies I should have given additional information. This happens without having created an account myself. These are the docker logs, starting from a clean installation with an APP_KEY set in the compose/.env file.
|
For comparison, this is the docker log when creating a clean install without setting APP_KEY. It recognizes there's no APP_KEY and generates one on its own, which is expected behaviour. And I am able to access the login portal. Then I;
|
I am working to try and reproduce. What OS are you on? x86 or arm? |
Manjaro(Arch linux), x86 |
After working on this some more - and dealing with a related issue - I think there were two things going on:
APP_KEY=base64:vrF6lYJzIaiABUKmuB5NThm/l5Tn7UpkNvXVWNzmlU8 Since the logs couldn't be written, I cant be for sure; but I suspect that's why you got errors when having set an I'll update this in the docs so it's more clear for future! Once v1.1.3 is built and pushed, can you give it another go and report back? |
Did a quick test, repulled the image, changed the compose file to match recent changes. The login page now succesfully loads when an APP_KEY is configured 👍. Registering a user works as expected. I'll post the docker log when I'm back at my system. And do some further testing. Edit:
./storage/logs/laravel.log
|
Great news! Appreciate your help troubleshooting this! |
It seems like there's still an issue. Adding a transaction will throw an error in the browser;
Not sure if this is relevant but some more info on the permissions for the storage log file;
Inside the container;
|
Yeah, the laravel.log file should never be owned by root... It's supposed to be I've updated the entrypoint to just always Alternatively, I just added a note in the compose file suggesting folks could also use a volume: services:
app:
# # #
volumes:
investbrain-storage:/var/app/storage
# # #
volumes:
investbrain-storage: |
Progress! The permission issue seems to be resolved, I no longer get the storage/logs error we saw before. Now a different issue arose. Upon doing actions such as registering a user and adding a transaction the site will throw a "500 Server Error". It however does do those actions. Creating a portfolio does not throw a 500 error. Eg.
from nginx/access.log
|
laravel.log is still owned by root:root btw |
Is anything being actually written to laravel.log? If not, the 500 is probably because the log is not writable by www-user. When you re-installed, did you wipe out the storage directory? |
Yeap, removed all folders & files (to avoid permission issues) before re-pulling & deploying.
From what I can see, nothing new is being written to it, only the initial deploy logs.
Docker log;
|
Very interesting. Market data calls work. Then at some point market data calls start failing... Something is happening to the file system after 3 minutes:
And then they continue to fail. Is that about the same time you created your first transaction? |
The full access.log could maybe show what I was doing, could be that was at point I was able to succesfully create a transaction? (I tried adding a transaction with a symbol it didn't know initially)
|
I'm still thinking this is a permissions issue. Can you docker exec -it investbrain-app chown -R www-data:www-data /var/app/storage |
Seems like that worked!
Additional logs are now added to the laraval.log file
Edit: |
Those damn permissions. Thanks for confirming. Not sure what's causing laravel.log to change ownership to root. Let me know if this comes up again! In the meantime, I'll close this out. |
Using the default docker-compose and .env allows me to register and login, but as soon as I manually add an APP_KEY using a value generated with
openssl rand -base64 32
it breaks.The following error is displayed in the browser when redeploying using an APP_KEY:
The docker compose file;
I assume I may be overlooking something but I can't figure out what.
If any other logs are required, I'll provide them.
Thanks in advance.
The text was updated successfully, but these errors were encountered: