mirror of
https://github.com/muety/wakapi.git
synced 2025-12-05 22:20:24 -08:00
ci: make docker container wait properly for database to come up
This commit is contained in:
@@ -6,6 +6,9 @@ WORKDIR /src
|
||||
ADD ./go.mod .
|
||||
RUN go mod download && go get github.com/markbates/pkger/cmd/pkger
|
||||
|
||||
RUN curl "https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh" -o wait-for-it.sh && \
|
||||
chmod +x wait-for-it.sh
|
||||
|
||||
ADD . .
|
||||
RUN go generate && go build -o wakapi
|
||||
|
||||
@@ -13,7 +16,8 @@ WORKDIR /app
|
||||
RUN cp /src/wakapi . && \
|
||||
cp /src/config.default.yml config.yml && \
|
||||
sed -i 's/listen_ipv6: ::1/listen_ipv6: /g' config.yml && \
|
||||
cp /src/wait-for-it.sh .
|
||||
cp /src/wait-for-it.sh . && \
|
||||
cp /src/entrypoint.sh .
|
||||
|
||||
# Run Stage
|
||||
|
||||
@@ -41,4 +45,4 @@ COPY --from=build-env /app .
|
||||
|
||||
VOLUME /data
|
||||
|
||||
ENTRYPOINT ./wait-for-it.sh
|
||||
ENTRYPOINT ./entrypoint.sh
|
||||
|
||||
Reference in New Issue
Block a user