diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3195ffa..a5f10b1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -71,5 +71,6 @@ jobs: # Run a new container from a new image docker run -d \ --restart always \ + -p 8080:8080 \ --name $(echo $IMAGE_NAME) \ $(echo $REGISTRY)/$(echo $IMAGE_NAME):$(echo $GITHUB_SHA | head -c7) \ No newline at end of file diff --git a/service/Dockerfile b/service/Dockerfile index 5a6aebe..85712cb 100644 --- a/service/Dockerfile +++ b/service/Dockerfile @@ -7,20 +7,12 @@ COPY . . RUN go build -o main main.go -RUN apk add curl -RUN curl -L https://github.com/golang-migrate/migrate/releases/download/v4.16.2/migrate.linux-arm64.tar.gz | tar xvz - # run state FROM alpine:3.18 WORKDIR /app COPY --from=builder /app/main . -COPY --from=builder /app/migrate ./migrate COPY app.env . -COPY start.sh . -COPY wait-for.sh . -COPY db/migrations ./migrations EXPOSE 8080 CMD [ "/app/main" ] -ENTRYPOINT [ "/app/start.sh" ]