Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Docker image for performing backups #271

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ The deployment stack consists of the following containers:
|------------------------|:-----------------------------------------------------------------------:|------------------------------------------|:-----------------------------:|
| `gse-database` | [mysql](https://registry.hub.docker.com/_/mysql) | Platform database | :white_check_mark: |
| `gse-migration` | [flyway](https://registry.hub.docker.com/r/flyway/flyway) | Database schema migration executions | :white_check_mark: |
| `gse-backup` | [tiredofit/db-backup](https://hub.docker.com/r/tiredofit/db-backup/) | Automated database backups | :negative_squared_cross_mark: |
| `gse-backup` | [databack/mysql-backup](https://hub.docker.com/r/databack/mysql-backup) | Automatic database backups | :negative_squared_cross_mark: |
| `gse-server` | [seart/ghs-server](docker/server/Dockerfile) | Spring Boot server application | :white_check_mark: |
| `gse-website` | [seart/ghs-website](docker/website/Dockerfile) | NGINX web server acting as HTML supplier | :white_check_mark: |
| `gse-watchtower` | [containrrr/watchtower](https://hub.docker.com/r/containrrr/watchtower) | Automatic Docker image updates | :negative_squared_cross_mark: |
Expand Down Expand Up @@ -224,7 +224,7 @@ services:

gse-backup:
restart: always
entrypoint: "/init"
entrypoint: "/entrypoint"
```

## FAQ
Expand Down
Empty file removed docker-compose/bkpdb/.keep
Empty file.
42 changes: 23 additions & 19 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,40 @@ services:
- default

gse-backup:
image: tiredofit/db-backup:4.1.0
image: databack/mysql-backup:1.0.0-rc5
container_name: gse-backup
restart: "no"
volumes:
- backup:/backup
- ./logs/backup:/logs
- backup:/home/appuser
environment:
TZ: UTC
TIMEZONE: Etc/UTC
DB01_TYPE: mysql
DB01_HOST: gse-database
DB01_PORT: 3306
DB01_NAME: gse
DB01_USER: gseadmin
DB01_PASS: Lugano2020
DEFAULT_BACKUP_BEGIN: "0000"
DEFAULT_CLEANUP_TIME: "10080"
DEFAULT_CHECKSUM: SHA1
DEFAULT_COMPRESSION: GZ
DEFAULT_CREATE_LATEST_SYMLINK: FALSE
DEBUG_MODE: TRUE
CONTAINER_ENABLE_MONITORING: FALSE
RETENTION: 1w
DB_NAMES: gse
DB_PORT: 3306
DB_USER: gseadmin
DB_PASS: Lugano2020
DB_SERVER: gse-database
DB_DUMP_CRON: "0 0 * * *"
DB_DUMP_TARGET: /home/appuser
DB_DUMP_DEBUG: true
DB_DUMP_SAFECHARS: true
MYSQLDUMP_OPTS: >-
--quick
--compact
--events
--triggers
--routines
--single-transaction
--max-allowed-packet=1G
--ignore-table=gse.label_ranked
--ignore-table=gse.topic_ranked
entrypoint: "true"
command: dump
depends_on:
gse-migration:
condition: service_completed_successfully
labels:
- "com.centurylinklabs.watchtower.scope=ghs"
links:
- gse-database
networks:
- default

Expand Down
11 changes: 8 additions & 3 deletions docker/backup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM tiredofit/db-backup:4.1.4
FROM databack/mysql-backup:1.0.0-rc5
LABEL maintainer="Ozren Dabić ([email protected])"

USER root

RUN apk update --quiet && \
apk add --no-cache \
--quiet \
openssh~=9.7 \
sshpass~=1.10
openssh~=9.1 \
sshpass~=1.09 \
tzdata~=2023d

USER appuser