mirror of
https://github.com/Kugelschieber/schnittfest.git
synced 2026-01-18 10:20:27 +00:00
Added sass build command and updated dockerfile and docker-compose.
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -2,17 +2,17 @@ FROM golang AS build
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y curl && \
|
||||
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh && bash nodesource_setup.sh && \
|
||||
curl -sL https://deb.nodesource.com/setup_13.x -o nodesource_setup.sh && bash nodesource_setup.sh && \
|
||||
apt-get install -y nodejs
|
||||
WORKDIR /go/src/github.com/Kugelschieber/schnittfest
|
||||
ADD . .
|
||||
COPY . .
|
||||
|
||||
# build server
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-s -w" /go/src/github.com/Kugelschieber/schnittfest/main.go && \
|
||||
mkdir /app && mv /go/src/github.com/Kugelschieber/schnittfest/main /app/server
|
||||
|
||||
# compile CSS
|
||||
RUN cd /go/src/github.com/Kugelschieber/schnittfest/style && bash -c "npm i" && bash -c "npm rebuild node-sass" && bash -c "npm run style"
|
||||
RUN cd /go/src/github.com/Kugelschieber/schnittfest/style && bash -c "npm i" && bash -c "npm rebuild node-sass" && bash -c "npm run build"
|
||||
|
||||
# copy resources
|
||||
RUN mv /go/src/github.com/Kugelschieber/schnittfest/template /app/template && \
|
||||
@@ -27,12 +27,6 @@ RUN apk update && \
|
||||
COPY --from=build /app /app
|
||||
WORKDIR /app
|
||||
|
||||
# use root to bind port 80 and 443
|
||||
#RUN addgroup -S appuser && \
|
||||
# adduser -S -G appuser appuser && \
|
||||
# chown -R appuser:appuser /app
|
||||
#USER appuser
|
||||
|
||||
# default config
|
||||
ENV SCHNITTFEST_HOST=0.0.0.0:80
|
||||
ENV SCHNITTFEST_LOGLEVEL=info
|
||||
|
||||
Reference in New Issue
Block a user