-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat(docker): Quickstart app with docker #136
feat(docker): Quickstart app with docker #136
Conversation
I have separated feat and docs in separate PR. |
Looks good 👍 I think that we may need to add another Dockerfile for the workflow or modify this one to include multiple targets. What do you think about that? One issue that I have ran into with the docker actions is that building it with respect to the runner may not work on intended architectures. For example, the runner is |
# Run the binary in a alpine container | ||
FROM ubuntu:22.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alpine image would be a nice to have over ubuntu, any chance if this could be done? I believe that an alpine image should be lighter than ubuntu?
FROM ubuntu:22.04 | ||
WORKDIR /app | ||
COPY --from=gowork /app/main . | ||
CMD [ "./main" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMD [ "./main" ] | |
CMD [ "./main" ] | |
@@ -0,0 +1,13 @@ | |||
services: | |||
server: | |||
image: go-fast-cdn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this as a note, but if we decide to go the official image route we will need to change this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
This PR adds a Dockerfile and docker-compose.yml to containerize the application. The Dockerfile sets up multi-stage builds for the front-end and back-end, while docker-compose.yml orchestrates container deployment with persistent storage for uploaded files and database data.
Key Changes:
Dockerfile: Multi-stage build for Node.js and Go applications.
docker-compose.yml: Manages service orchestration and persistence.
Instructions:
Start the application:
docker-compose up -d
Please review and provide feedback.