Docker installation made easy #271
rqi14
started this conversation in
Show and tell
Replies: 1 comment
-
You are the fucking man!! props |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Deploying and running complex projects can be a challenging and time-consuming task. To streamline this process, I have created Docker images for my project that can be easily deployed without going through the lengthy build process every time. While there is still a bit of build involved, this method significantly reduces the complexity and effort required.
The automation of this process is handled using GitHub Actions, which check for updates and build the Docker images daily. This ensures that the images are always up-to-date and ready for deployment.
You can find the repository here: Perplexica-docker
Handling Frontend Configuration with Next.js
One of the challenges faced with the frontend, which uses Next.js, is the hardcoding of NEXT_PUBLIC_API_URL and NEXT_PUBLIC_WS_URL into the JavaScript files during the build process.
As it is hardcoded, the image needs to vary depending on the configuration of these URLs.
My solution is to build the Docker image as usual and then use sed to substitute these values at deployment time.
This is done by specifying these commands in the dockerfile so no extra effort is needed.
This approach allows for greater flexibility and ensures the correct configuration is applied in different environments.
For more details and to try it out, visit the repository: Perplexica-docker
Beta Was this translation helpful? Give feedback.
All reactions