mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
Fix and tweak Dockerfile.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#### Tailwind CSS build stage
|
#### Tailwind CSS build stage
|
||||||
FROM node:20 as tailwindbuilder
|
FROM node:20 AS tailwindbuilder
|
||||||
|
|
||||||
# Set a temporary work directory
|
# Set a temporary work directory
|
||||||
WORKDIR /app/tailwind
|
WORKDIR /app/tailwind
|
||||||
@@ -11,10 +11,10 @@ COPY --link . .
|
|||||||
RUN npm install tailwindcss
|
RUN npm install tailwindcss
|
||||||
|
|
||||||
# Generate minified Tailwind CSS bundle
|
# Generate minified Tailwind CSS bundle
|
||||||
RUN npx tailwind -i node_modules/tailwindcss/tailwind.css -o tailwind-bundle.min.css --minify
|
RUN npx tailwind -i base.css -o tailwind-bundle.min.css --minify
|
||||||
|
|
||||||
#### Go build stage
|
#### Go build stage
|
||||||
FROM golang:1.21.4 as gobuilder
|
FROM golang:1.22.5-alpine AS gobuilder
|
||||||
|
|
||||||
# Set a temporary work directory
|
# Set a temporary work directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -45,5 +45,8 @@ WORKDIR /root/
|
|||||||
# Copy Go binary
|
# Copy Go binary
|
||||||
COPY --from=gobuilder /app/main .
|
COPY --from=gobuilder /app/main .
|
||||||
|
|
||||||
|
# Expose port
|
||||||
|
EXPOSE 2999
|
||||||
|
|
||||||
# Run the application
|
# Run the application
|
||||||
CMD ["./main"]
|
CMD ["./main"]
|
||||||
|
|||||||
Reference in New Issue
Block a user