-
Notifications
You must be signed in to change notification settings - Fork 23
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
Include docker-compose steps in hosting for localized database backups #7929
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -29,6 +29,8 @@ services: | |||||||||||
- VIRTUAL_HOST=${PUBLIC_HOST} | ||||||||||||
- LETSENCRYPT_HOST=${PUBLIC_HOST} | ||||||||||||
user: ${USER_UID:-1000}:${USER_GID:-1000} | ||||||||||||
networks: | ||||||||||||
- webknossos_default | ||||||||||||
|
||||||||||||
# Postgres | ||||||||||||
postgres: | ||||||||||||
|
@@ -59,6 +61,7 @@ services: | |||||||||||
# FossilDB | ||||||||||||
fossildb: | ||||||||||||
image: scalableminds/fossildb:master__489 | ||||||||||||
container_name: webknossos-fossildb-1 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
command: | ||||||||||||
- fossildb | ||||||||||||
- -c | ||||||||||||
|
@@ -97,6 +100,7 @@ services: | |||||||||||
labels: | ||||||||||||
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy | ||||||||||||
|
||||||||||||
# Nginx-Lets-Encrypt | ||||||||||||
nginx-letsencrypt: | ||||||||||||
image: nginxproxy/acme-companion | ||||||||||||
environment: | ||||||||||||
|
@@ -108,3 +112,39 @@ services: | |||||||||||
- ./persistent/nginx/certs:/etc/nginx/certs | ||||||||||||
- ./persistent/nginx/vhost.d:/etc/nginx/vhost.d | ||||||||||||
- ./persistent/nginx/html:/usr/share/nginx/html | ||||||||||||
|
||||||||||||
# FossilDB Backup -- backup located to ../persistent/fossildb/backup/private after completion | ||||||||||||
# Example command: docker-compose run --rm fossil-db-backup | ||||||||||||
fossil-db-backup: | ||||||||||||
Comment on lines
+117
to
+118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
image: scalableminds/fossildb-client:master | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
depends_on: | ||||||||||||
fossildb: | ||||||||||||
condition: service_healthy | ||||||||||||
command: ["webknossos-fossildb-1", "backup"] | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
networks: | ||||||||||||
- webknossos_default | ||||||||||||
Comment on lines
+124
to
+125
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
# FossilDB Restore | ||||||||||||
# Example command: docker-compose run --rm fossil-db-restore | ||||||||||||
fossil-db-restore: | ||||||||||||
Comment on lines
+128
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
image: scalableminds/fossildb-client:master | ||||||||||||
depends_on: | ||||||||||||
fossildb: | ||||||||||||
condition: service_healthy | ||||||||||||
command: [ "webknossos-fossildb-1", "restore" ] | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
networks: | ||||||||||||
- webknossos_default | ||||||||||||
Comment on lines
+135
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
# Postgres backup | ||||||||||||
postgres-backup: | ||||||||||||
image: postgres | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
command: [ "/bin/bash", "-c", "PGPASSWORD=postgres pg_dump -Fc -h postgres -U postgres webknossos | gzip > /backups/backup_$(date +%Y-%m-%d_%H-%M).sql.gz" ] | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
volumes: | ||||||||||||
- ./backups:/backups | ||||||||||||
depends_on: | ||||||||||||
- postgres | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
# Explicitly declare networks for fossil-db-backup connectivity | ||||||||||||
networks: | ||||||||||||
webknossos_default: | ||||||||||||
external: true | ||||||||||||
Comment on lines
+146
to
+150
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think an explicit network is required. We don't have that in our docker compose-based deployments.