Skip to content

Commit

Permalink
build: remove database backups from development setup (#1039)
Browse files Browse the repository at this point in the history
* build: move backup container from dev --> staging only

* docs: extra info on accessing minio console
  • Loading branch information
spwoodcock authored Dec 11, 2023
1 parent fb3d0d6 commit da2e5fb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
26 changes: 2 additions & 24 deletions docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ services:
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}
MINIO_VOLUMES: "/mnt/data"
MINIO_BROWSER: "off"
# MINIO_CONSOLE_ADDRESS: ":9090"
volumes:
- fmtm_data:/mnt/data
networks:
- fmtm-net
command: minio server # --console-address ":9090"
command: minio server
restart: "unless-stopped"
healthcheck:
test: curl --fail http://localhost:9000/minio/health/live || exit 1
Expand Down Expand Up @@ -232,29 +233,6 @@ services:
entrypoint: ["/migrate-entrypoint.sh"]
restart: "on-failure:3"

backups:
image: "ghcr.io/hotosm/fmtm/backend:${GIT_BRANCH}"
container_name: fmtm-backups-${GIT_BRANCH}
depends_on:
fmtm-db:
condition: service_healthy
central-db:
condition: service_healthy
s3:
condition: service_healthy
env_file:
- .env
networks:
- fmtm-net
entrypoint: ["/backup-entrypoint.sh"]
restart: "on-failure:3"
healthcheck:
test: pg_isready -U ${FMTM_DB_USER} -d ${FMTM_DB_NAME}
start_period: 5s
interval: 10s
timeout: 5s
retries: 3

certbot:
image: "ghcr.io/hotosm/fmtm/proxy:certs-init-development"
container_name: fmtm-cert-renew-${GIT_BRANCH}
Expand Down
24 changes: 21 additions & 3 deletions docker-compose.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,27 @@ services:
file: docker-compose.development.yml
service: migrations
backups:
extends:
file: docker-compose.development.yml
service: backups
image: "ghcr.io/hotosm/fmtm/backend:${GIT_BRANCH}"
container_name: fmtm-backups-${GIT_BRANCH}
depends_on:
fmtm-db:
condition: service_healthy
central-db:
condition: service_healthy
s3:
condition: service_healthy
env_file:
- .env
networks:
- fmtm-net
entrypoint: ["/backup-entrypoint.sh"]
restart: "on-failure:3"
healthcheck:
test: pg_isready -U ${FMTM_DB_USER} -d ${FMTM_DB_NAME}
start_period: 5s
interval: 10s
timeout: 5s
retries: 3
certbot:
extends:
file: docker-compose.development.yml
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,15 @@ services:
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY:-somelongpassword}
MINIO_VOLUMES: "/mnt/data"
MINIO_BROWSER: "off"
# MINIO_CONSOLE_ADDRESS: ":9090"
volumes:
- fmtm_data:/mnt/data
# ports:
# - 9000:9000
# - 9090:9090
networks:
- fmtm-net
command: minio server # --console-address ":9090"
command: minio server
restart: "unless-stopped"
healthcheck:
test: curl --fail http://localhost:9000/minio/health/live || exit 1
Expand Down

0 comments on commit da2e5fb

Please sign in to comment.