diff --git a/.gitignore b/.gitignore index 823457b..6496581 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ digitaldemocratic.conf -*.yml +docker-compose.yml **/*.yaml custom/ diff --git a/custom.sample/preseed/groups.yml b/custom.sample/preseed/groups.yml new file mode 100644 index 0000000..e69de29 diff --git a/custom.sample/preseed/labels.yml b/custom.sample/preseed/labels.yml new file mode 100644 index 0000000..e69de29 diff --git a/custom.sample/preseed/roles.yml b/custom.sample/preseed/roles.yml new file mode 100644 index 0000000..e69de29 diff --git a/custom.sample/preseed/users.yml b/custom.sample/preseed/users.yml new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose-parts/admin.yml b/docker-compose-parts/admin.yml new file mode 100644 index 0000000..4b16cfe --- /dev/null +++ b/docker-compose-parts/admin.yml @@ -0,0 +1,24 @@ +version: '3.7' +services: + dd-admin: + container_name: dd-admin + build: + context: ${BUILD_ROOT_PATH} + dockerfile: admin/docker/Dockerfile + target: production + args: ## DEVELOPMENT + SSH_ROOT_PWD: ${IPA_ADMIN_PWD} + SSH_PORT: 2022 + networks: + - isard_net + ports: + - "2022:22" + # - "9000:9000" + restart: unless-stopped + volumes: + - /etc/localtime:/etc/localtime:ro + - ${BUILD_ROOT_PATH}/admin/src:/admin # Revome in production + - ${BUILD_ROOT_PATH}/custom:/admin/custom #:ro in production + env_file: + - .env + command: sleep infinity diff --git a/docker-compose-parts/backup.yml b/docker-compose-parts/backup.yml new file mode 100644 index 0000000..86fc6f6 --- /dev/null +++ b/docker-compose-parts/backup.yml @@ -0,0 +1,27 @@ +version: '3.7' +services: + dd-backups: + container_name: dd-backups + image: prodrigestivill/postgres-backup-local + restart: always + volumes: + - /etc/localtime:/etc/localtime:ro + - ${BACKUP_FOLDER}/sso:/backups + # links: + # - ${KEYCLOAK_DB_ADDR}:${KEYCLOAK_DB_ADDR} + # depends_on: + # - ${KEYCLOAK_DB_ADDR} + environment: + - TZ="Europe/Madrid" + - POSTGRES_HOST=${KEYCLOAK_DB_ADDR} + - POSTGRES_DB=${KEYCLOAK_DB_DATABASE},moodle,nextcloud + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_EXTRA_OPTS=-Z9 --schema=public --blobs + - SCHEDULE=@every 0h30m00s + - BACKUP_KEEP_DAYS=7 + - BACKUP_KEEP_WEEKS=4 + - BACKUP_KEEP_MONTHS=6 + - HEALTHCHECK_PORT=81 + networks: + - isard_net \ No newline at end of file diff --git a/scripts/backups/automated.yml b/scripts/backups/automated.yml new file mode 100644 index 0000000..03d5061 --- /dev/null +++ b/scripts/backups/automated.yml @@ -0,0 +1,21 @@ + pgbackups: + container_name: Backup + image: prodrigestivill/postgres-backup-local + restart: always + volumes: + - ./backup:/backups + links: + - db:db + depends_on: + - db + environment: + - POSTGRES_HOST=db + - POSTGRES_DB=${DB_NAME} + - POSTGRES_USER=${DB_USER} + - POSTGRES_PASSWORD=${DB_PASSWORD} + - POSTGRES_EXTRA_OPTS=-Z9 --schema=public --blobs + - SCHEDULE=@every 0h30m00s + - BACKUP_KEEP_DAYS=7 + - BACKUP_KEEP_WEEKS=4 + - BACKUP_KEEP_MONTHS=6 + - HEALTHCHECK_PORT=81