-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: deployment via docker container
- Loading branch information
Showing
4 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
FROM alpine:3.18 | ||
FROM alpine:3.20 | ||
|
||
RUN apk add --no-cache curl postgresql15 python3 py3-prometheus-client py3-requests jq docker-cli docker-cli-compose | ||
RUN apk add --no-cache curl postgresql15 python3 py3-prometheus-client py3-requests jq docker-cli docker-cli-compose | ||
|
||
COPY docker/cron/periodic /etc/periodic/ | ||
COPY docker/cron/update.sh /update.sh | ||
|
||
COPY docker/cron/deploy.sh /deploy.sh | ||
|
||
RUN mkdir -p /dist/docker | ||
COPY docker/defaults.env /dist/docker/defaults.env | ||
COPY docker/docker-compose.yml /dist/docker/docker-compose.yml | ||
COPY docker/user_manage.sh /dist/docker/user_manage.sh | ||
|
||
ARG RELEASE | ||
ENV RELEASE=$RELEASE | ||
|
||
# run crond in foreground and log output of crons | ||
CMD crond -f -l2 | ||
CMD crond -f -l2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
cd /opt/Internet.nl/ | ||
|
||
echo "Deploying release: $RELEASE" | ||
|
||
# copy release specific support files | ||
cp -v /dist/docker/* docker | ||
|
||
# set release version in local.env config | ||
echo "RELEASE='$RELEASE' # deploy ${date}" >> docker/local.env | ||
|
||
# download release images | ||
docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env pull | ||
|
||
# bring up application with new release | ||
docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env up --remove-orphans --wait --no-build | ||
|
||
echo "Deploy completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters