docker update

This commit is contained in:
meninjar dev
2024-09-18 07:32:08 +00:00
parent 8dac62584d
commit a2f6aeac1d
2 changed files with 5 additions and 4 deletions

View File

@@ -8,14 +8,15 @@ RUN go mod tidy
COPY . . COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a installsuffix cgo -o main . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM alpine:latest FROM alpine:latest
RUN apk --no-cache add ca-certificates RUN apk --no-cache add ca-certificates
WORKDIR /root/ WORKDIR /root/
# COPY --from=builder /app/main . COPY --from=builder /app/main .
COPY --from=builder /app/.env . COPY --from=builder /app/.env .
EXPOSE 80 EXPOSE 8080
CMD ["./main"] CMD ["./main"]

View File

@@ -7,7 +7,7 @@ services:
container_name: api-rssa container_name: api-rssa
restart: always restart: always
ports: ports:
- 6000:80 - 8080:8080
volumes: volumes:
- .:/app - .:/app
environment: environment: