Added real frontend
Made hostname global and easy to change in docker
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,17 +1,17 @@
|
||||
FROM node:lts-alpine as build_vue
|
||||
#FROM node:lts-alpine as build_vue
|
||||
|
||||
# make the 'app' folder the current working directory
|
||||
WORKDIR /app
|
||||
#WORKDIR /app
|
||||
|
||||
# copy both 'package.json' and 'package-lock.json' (if available)
|
||||
COPY cmd/frontend/package*.json ./
|
||||
#COPY cmd/frontend/package*.json ./
|
||||
|
||||
# install project dependencies
|
||||
RUN npm install
|
||||
#RUN npm install
|
||||
|
||||
COPY cmd/frontend .
|
||||
#COPY cmd/frontend .
|
||||
|
||||
RUN npm run build
|
||||
#RUN npm run build
|
||||
|
||||
FROM golang:1.16-alpine as build_go
|
||||
|
||||
@@ -25,25 +25,25 @@ RUN go mod download
|
||||
|
||||
WORKDIR /music-server/cmd
|
||||
|
||||
COPY --from=build_vue /app/dist ./frontend/dist
|
||||
#COPY --from=build_vue /app/dist ./frontend/dist
|
||||
|
||||
RUN go build -o /music-server/MusicServer
|
||||
|
||||
# Stage 2, distribution container
|
||||
FROM golang:1.16-alpine
|
||||
RUN apk add --no-cache bash
|
||||
RUN apk add --no-cache bash npm
|
||||
EXPOSE 8080
|
||||
VOLUME /sorted
|
||||
VOLUME /doc
|
||||
|
||||
ENV DB_HOST ""
|
||||
ENV DB_PORT ""
|
||||
ENV DB_USERNAME ""
|
||||
ENV DB_PASSWORD ""
|
||||
ENV DB_NAME ""
|
||||
ENV HOSTNAME ""
|
||||
|
||||
COPY --from=build_go /music-server/MusicServer .
|
||||
COPY docs/swagger.yaml .
|
||||
COPY cmd/frontend ./frontend/
|
||||
COPY ./songs/ ./songs/
|
||||
COPY ./init.sh .
|
||||
RUN chmod 777 ./init.sh
|
||||
|
||||
Reference in New Issue
Block a user