File tree Expand file tree Collapse file tree
charts/database/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM docker.io/drycc/base:bullseye
22
3- ENV PGDATA /opt/drycc/postgresql/14/data
4- ENV WALG_ENVDIR /etc/wal-g.d/env
5-
63COPY rootfs/bin /bin/
74COPY rootfs/docker-entrypoint-initdb.d /docker-entrypoint-initdb.d/
85COPY rootfs/docker-entrypoint.sh /docker-entrypoint.sh
@@ -11,8 +8,13 @@ ENV JQ_VERSION="1.6" \
118 MC_VERSION="2022.02.26.03.58.31" \
129 WAL_G_VERSION="1.1" \
1310 PYTHON_VERSION="3.10.2" \
11+ PG_MAJOR=14 \
1412 POSTGRESQL_VERSION="14.2"
1513
14+
15+ ENV PGDATA /data/${PG_MAJOR}
16+ ENV WALG_ENVDIR /etc/wal-g.d/env
17+
1618RUN mkdir -p $WALG_ENVDIR \
1719 && install-stack jq $JQ_VERSION \
1820 && install-stack gosu $GOSU_VERSION \
Original file line number Diff line number Diff line change 2424 - name : drycc-database-init
2525 image : docker.io/drycc/python-dev:latest
2626 imagePullPolicy : {{.Values.imagePullPolicy}}
27- command :
27+ args :
2828 - netcat
2929 - -v
3030 - -a
@@ -60,12 +60,14 @@ spec:
6060 preStop :
6161 exec :
6262 command :
63+ - init-stack
6364 - gosu
6465 - postgres
6566 - do_backup
6667 readinessProbe :
6768 exec :
6869 command :
70+ - init-stack
6971 - is_running
7072 initialDelaySeconds : 30
7173 timeoutSeconds : 1
7678 mountPath : /var/run/secrets/drycc/objectstore/creds
7779 {{- if .Values.persistence.enabled }}
7880 - name : database-data
79- mountPath : /var/lib/postgresql
81+ mountPath : /data
8082 {{- end }}
8183 volumes :
8284 {{- if .Values.persistence.enabled }}
Original file line number Diff line number Diff line change @@ -26,13 +26,12 @@ echo "1234567890123456789012345678901234567890" > "${CURRENT_DIR}"/tmp/aws-user/
2626
2727# boot minio
2828mkdir -p " ${CURRENT_DIR} " /tmp/bin
29- echo " ls /data/*/basebackups_005" > " ${CURRENT_DIR} " /tmp/bin/backups.sh
29+ echo " ls /data/database-bucket/ */basebackups_005" > " ${CURRENT_DIR} " /tmp/bin/backups.sh
3030MINIO_JOB=$( docker run -d \
3131 -v " ${CURRENT_DIR} " /tmp/bin:/tmp/bin \
3232 -v " ${CURRENT_DIR} " /tmp/aws-user:/var/run/secrets/drycc/objectstore/creds \
3333 drycc/minio:canary server /data/)
3434
35-
3635puts-step " minio starting, wait 30s."
3736sleep 30
3837
@@ -55,6 +54,7 @@ check-postgres "${PG_JOB}"
5554# check if minio has the 5 backups
5655puts-step " checking if minio has 5 backups"
5756BACKUPS=" $( docker exec " ${MINIO_JOB} " sh /tmp/bin/backups.sh | grep json) "
57+
5858NUM_BACKUPS=" $( echo " ${BACKUPS} " | wc -w) "
5959# NOTE (bacongobbler): the BACKUP_FREQUENCY is only 1 second, so we could technically be checking
6060# in the middle of a backup. Instead of failing, let's consider N+1 backups an acceptable case
You can’t perform that action at this time.
0 commit comments