Images should not be included in the database Removes songs where the path doesn't work Started working on adding cover images Started adding vue directly in the application
32 lines
606 B
Docker
32 lines
606 B
Docker
FROM golang:1.16-alpine as build_go
|
|
|
|
COPY go.* /music-server/
|
|
COPY ./cmd /music-server/cmd/
|
|
COPY ./pkg /music-server/pkg/
|
|
|
|
WORKDIR /music-server/
|
|
RUN go mod download
|
|
|
|
WORKDIR /music-server/cmd/backend
|
|
RUN go build -o /music-server/MusicServer
|
|
|
|
# Stage 2, distribution container
|
|
FROM golang:1.16-alpine
|
|
RUN apk add --no-cache bash
|
|
EXPOSE 8080
|
|
VOLUME /sorted
|
|
VOLUME /doc
|
|
|
|
ENV DB_HOST ""
|
|
ENV DB_PORT ""
|
|
ENV DB_USERNAME ""
|
|
ENV DB_PASSWORD ""
|
|
ENV DB_NAME ""
|
|
|
|
COPY --from=build_go /music-server/MusicServer .
|
|
COPY docs/swagger.yaml .
|
|
COPY ./songs/ ./songs/
|
|
COPY ./init.sh .
|
|
RUN chmod 777 ./init.sh
|
|
|
|
CMD ./init.sh |