-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM golang:1.22-alpine AS base | ||
|
||
WORKDIR /app | ||
|
||
# Install dependencies required for the build process | ||
RUN apk add --no-cache make curl | ||
|
||
RUN curl -L https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.4/tailwindcss-linux-arm64 -o tailwindcss \ | ||
&& chmod +x tailwindcss | ||
|
||
RUN go install github.com/a-h/templ/cmd/templ@latest | ||
|
||
FROM base AS development | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build | ||
|
||
FROM base AS production | ||
|
||
COPY --from=development --chown=golang:golang /app /app | ||
|
||
USER golang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "3.8" | ||
networks: | ||
default: | ||
name: ${NETWORK:-app} | ||
external: true | ||
|
||
services: | ||
app: | ||
image: ${IMAGE_ID:-app} | ||
command: make start | ||
volumes: | ||
- ../:/app | ||
working_dir: /app | ||
environment: | ||
- LOG_LEVEL=debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters