1
0
mirror of https://github.com/ebosas/microservices.git synced 2025-08-24 20:08:55 +02:00

Change directories to ./

This commit is contained in:
ebosas
2021-11-02 16:55:29 +02:00
parent 70cf31aea8
commit 45aef82cf9
3 changed files with 10 additions and 10 deletions

View File

@@ -1,10 +1,10 @@
# FROM golang:1.17-alpine AS cache # FROM golang:1.17-alpine AS cache
FROM public.ecr.aws/bitnami/golang:1.17 AS cache FROM public.ecr.aws/bitnami/golang:1.17 AS cache
WORKDIR /go/src/app WORKDIR /go/src/app
COPY go.* . COPY go.* ./
COPY internal ./internal COPY internal ./internal
RUN go mod download RUN go mod download
COPY cmd/cache . COPY cmd/cache ./
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o cache . RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o cache .
FROM scratch FROM scratch

View File

@@ -1,10 +1,10 @@
# FROM golang:1.17-alpine AS database # FROM golang:1.17-alpine AS database
FROM public.ecr.aws/bitnami/golang:1.17 AS database FROM public.ecr.aws/bitnami/golang:1.17 AS database
WORKDIR /go/src/app WORKDIR /go/src/app
COPY go.* . COPY go.* ./
COPY internal ./internal COPY internal ./internal
RUN go mod download RUN go mod download
COPY cmd/database . COPY cmd/database ./
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o database . RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o database .
FROM scratch FROM scratch

View File

@@ -1,31 +1,31 @@
# FROM node:14-alpine AS react # FROM node:14-alpine AS react
FROM public.ecr.aws/bitnami/node:16 AS react FROM public.ecr.aws/bitnami/node:16 AS react
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY web/react/package*.json . COPY web/react/package*.json ./
RUN npm install RUN npm install
COPY web/react . COPY web/react ./
RUN npm run build RUN npm run build
# FROM node:14-alpine AS bootstrap # FROM node:14-alpine AS bootstrap
FROM public.ecr.aws/bitnami/node:16 AS bootstrap FROM public.ecr.aws/bitnami/node:16 AS bootstrap
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY web/bootstrap/package*.json . COPY web/bootstrap/package*.json ./
RUN npm install RUN npm install
COPY cmd/server/template ./ref/ COPY cmd/server/template ./ref/
COPY --from=react /usr/src/app/build ./ref/ COPY --from=react /usr/src/app/build ./ref/
COPY web/bootstrap . COPY web/bootstrap ./
RUN npm run css RUN npm run css
# Build container for server # Build container for server
# FROM golang:1.17-alpine AS server # FROM golang:1.17-alpine AS server
FROM public.ecr.aws/bitnami/golang:1.17 AS server FROM public.ecr.aws/bitnami/golang:1.17 AS server
WORKDIR /go/src/app WORKDIR /go/src/app
COPY go.* . COPY go.* ./
COPY internal ./internal COPY internal ./internal
RUN go mod download RUN go mod download
COPY --from=react /usr/src/app/build ./static/build/ COPY --from=react /usr/src/app/build ./static/build/
COPY --from=bootstrap /usr/src/app/build ./static/build/ COPY --from=bootstrap /usr/src/app/build ./static/build/
COPY cmd/server . COPY cmd/server ./
# Flag info https://golang.org/cmd/link/ # Flag info https://golang.org/cmd/link/
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o server . RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o server .