Ticket: CORS Error on Localhost During Docker Deployment
@ceLL Just created a ticket
Question: Is CORS a problem when running on localhost? I have cloned the app, ran docker compose up, then on login page a CORS error is shown. I haven't found anything in the docs page related to this. Since is a localhost and not hosted anywhere, https is not required (also from the docs)
Attempted: I am a newbie in docker images so nothing much that I have tried.
Working On: I am trying to deploy the application locally.
Take it from here @Mod 🔥
Question: Is CORS a problem when running on localhost? I have cloned the app, ran docker compose up, then on login page a CORS error is shown. I haven't found anything in the docs page related to this. Since is a localhost and not hosted anywhere, https is not required (also from the docs)
Attempted: I am a newbie in docker images so nothing much that I have tried.
Working On: I am trying to deploy the application locally.
Take it from here @Mod 🔥
49 Replies
Can you show us your .env file?
I deleted irrelevant infos, and i have changed nothing
Can you try to change NEXT_PUBLIC_BACKEND_URL and BACKEND_INTERNAL_URL to
Yes
From docker logs
looks like you haven't modified your
Should i modify it to what?
from docker file?
Can you paste here your docker-compose file that you are using?
it's the one from the documentation.
Can you check that your postgres database is running?
I think so:
Can you try this db url instead?
in .env or compose file?
do in both
I am not sure how @xcons configured it
same
When you click on postiz-postgres
on the docker
what are the logs you see?
it looks like it didn't create it so well
can you try maybe to remove all the docker
and run everything again?
i deleted everything, unzipped the project, created docker-compose yaml file & .env file from documentation, and run docker compose up
I am not sure why but it's not creating the user in postgres
@xcons can you have a look when you have some time?
https://docs.postiz.com/installation/docker-compose - location of the docker file
Did you create a new docker-compose.yml file
or used the existing one
docker-compose.dev.yaml
I created a new file.
I did a full clean up, deleted everything from docker, and locally, did it from the beginning
Now the issue is not appearing anymore
on login / sign-up page:
Does it have default credentials to be used?
oh you are running it locally
Yes
This needs to be
in .env file
I did not find anything related to this
What do you mean?
wanted to point to this, sorry
Change it also in the docker composer file
you mean these ones?
Yes
yes
without the "/"
yeah
managed to reach this page:
So probably now it works
yup 🙂
in .env i belive i need to set my api keys for everything
yes
does it needs to have any other config files ?
or just the id and secret and it's fine
Just follow all of them from the docs 🙂
You will find a section Providers Configurations
This can be closed for now. Thank you
This thread is now closed! Feel free to open a new one if you need help