-
Hi Everyone, I'm trying to deploy payload with docker to a DigitalOcean Droplet. I push it to my gitlab ci/cd runner, which builds the docker image and then saves it to the container registry (also gitlab). I then pull the image on my droplet, which uses caddy 2 as my reverse proxy. I can access the api on my computer, but aparently, the admin panel can not. This is my .env file on local, that I then override with docker env vars.
On production I use the same, except PAYLOAD_PUBLIC_SERVER_URL
When I try to access This works though, so I really don't know where I went wrong. I did already read through Issues and Discussions, but can't seem to figure it out. I also tried to use the next.js template or this repo here https://github.com/joshhills/joshhills-site, but to no avail. My Docker FIle:
gitlab ci
I'd be greatful for any hints! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Okay, so I know I just started this discussion 15 minutes ago, but I finally found the culprit: my local .env file was used for the build process of the admin panel and by that was pointing to localhost instead of my URI. So I just need to figure out how to get the PAYLOAD_PUBLIC_SERVER_URL dynamic in gitlab ci. |
Beta Was this translation helpful? Give feedback.
-
Okay, so I did manage to get everything working with Docker. I did already dip my toe into docker-compose, so I think it will follow, but for now I'm just gonna use MongoDB Atlas. Like described before, the reason it did not work was, that I had to supply the final URL to the payload.config file without hardcoding it in. Using the method bellow works for me and using it dynamic with Docker & Gitlab CI/CD. To make it easier for people to also use docker with the gitlab-ci (or maybe github actions, or any other CI tool) here's the run down: 1. Push your code gitlab (if not already done)2. (Optional: If you want to set the variables in the
|
Beta Was this translation helpful? Give feedback.
Okay, so I did manage to get everything working with Docker. I did already dip my toe into docker-compose, so I think it will follow, but for now I'm just gonna use MongoDB Atlas.
Like described before, the reason it did not work was, that I had to supply the final URL to the payload.config file without hardcoding it in. Using the method bellow works for me and using it dynamic with Docker & Gitlab CI/CD. To make it easier for people to also use docker with the gitlab-ci (or maybe github actions, or any other CI tool) here's the run down:
1. Push your code gitlab (if not already done)
2. (Optional: If you want to set the variables in the
.gitlab-ci.yml
file, you can skip this)Go to your…