2024-07-24 07:05:47 +00:00
|
|
|
FROM alpine as builder
|
2022-05-10 10:45:57 +00:00
|
|
|
|
2023-03-13 13:38:00 +00:00
|
|
|
# Get migration tool
|
|
|
|
WORKDIR /
|
2024-07-24 07:05:47 +00:00
|
|
|
ARG GOOSE_VERSION="v3.6.1"
|
2023-10-18 13:16:16 +00:00
|
|
|
RUN arch=$(arch | sed s/aarch64/arm64/) && \
|
2024-07-24 07:05:47 +00:00
|
|
|
wget -O ./goose https://github.com/pressly/goose/releases/download/${GOOSE_VERSION}/goose_linux_${arch}
|
2023-03-13 13:38:00 +00:00
|
|
|
RUN chmod +x ./goose
|
2022-05-10 10:45:57 +00:00
|
|
|
|
|
|
|
# app container
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-03-13 13:38:00 +00:00
|
|
|
COPY --from=builder /goose goose
|
2024-07-24 07:05:47 +00:00
|
|
|
ADD scripts/startup_script.sh .
|
|
|
|
ADD db/migrations migrations
|
2022-05-10 10:45:57 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/app/startup_script.sh"]
|