Skip to content
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

Create Dockerfile #628

Closed
wants to merge 2 commits into from

Conversation

pushpitkamboj
Copy link

This Dockerfile sets up a multi-stage build for a web application:
The first stage compiles the Golang backend code and creates a 'main' binary.
The second stage handles front-end asset compilation, specifically converting SCSS to CSS using SASS. Finally, it combines the Golang binary and compiled CSS into a final image, ready to run the web application on port 8080.

This Dockerfile sets up a multi-stage build for a web application:

    The first stage compiles the Golang backend code and creates a 'main' binary.
    The second stage handles frontend asset compilation, specifically converting SCSS to CSS using SASS.
    Finally, it combines the Golang binary and compiled CSS into a final image, ready to run the web application on port 8080.

Signed-off-by: pushpit kamboj <[email protected]>
@pushpitkamboj pushpitkamboj requested a review from a team as a code owner November 16, 2023 11:16
Copy link
Member

@AidanDelaney AidanDelaney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if, instead of a Dockerfile, we could use buildpacks to build an image? Where do you intend to deploy the image?


# Copy and build the Golang application
COPY . .
RUN go build -o main ./*.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a go application at the root level?

RUN go build -o main ./*.go

# Stage 2: Build frontend assets (SCSS to CSS)
FROM node:latest AS frontend
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any CSS assets to build?

@AidanDelaney
Copy link
Member

Do we have any answers to my review queries yet?

@AidanDelaney
Copy link
Member

Closing this pending answers to review questions. Please re-open if you want to follow up on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants