From 65247d1f8f67379e47c6043bfd4c76ce0875eb74 Mon Sep 17 00:00:00 2001 From: Simon C Date: Wed, 21 Jul 2021 11:07:55 +0200 Subject: [PATCH] feat: Remove Codimd service --- codimd/.env | 25 ---------------- codimd/README.md | 44 ---------------------------- codimd/docker-compose.postgres.yml | 19 ------------ codimd/docker-compose.traefik.yml | 13 --------- codimd/docker-compose.yml | 24 --------------- codimd/run | 47 ------------------------------ 6 files changed, 172 deletions(-) delete mode 100644 codimd/.env delete mode 100644 codimd/README.md delete mode 100644 codimd/docker-compose.postgres.yml delete mode 100644 codimd/docker-compose.traefik.yml delete mode 100644 codimd/docker-compose.yml delete mode 100644 codimd/run diff --git a/codimd/.env b/codimd/.env deleted file mode 100644 index 21a8e76..0000000 --- a/codimd/.env +++ /dev/null @@ -1,25 +0,0 @@ -## DOCKER - -COMPOSE_FILE=./docker-compose.postgres.yml:./docker-compose.yml:./docker-compose.traefik.yml -DOCKER_HOST=ssh://pi@obelix:2222 -TRAEFIK_NETWORK_NAME=kifeart - -## APP - -CODIMD_IMAGE=linuxserver/codimd:1.6.0-ls35 -CODIMD_CONTAINER_NAME=codimd -CODIMD_VOLUME_NAME=codimd -CODIMD_DOMAIN=codimd.cool.life - -NODE_ENV=production -CMD_PROTOCOL_USESSL=true - -# DATABASE -# Voir la description ../postgres/README.md - -POSTGRES_IMAGE=postgres:12.7-alpine -POSTGRES_USER=user-example -POSTGRES_PASSWORD=password-example -POSTGRES_DB=postgres-database-name-example -POSTGRES_CONTAINER_NAME=codimd-postgres -POSTGRES_VOLUME_NAME=codimd-postgres diff --git a/codimd/README.md b/codimd/README.md deleted file mode 100644 index 43124bc..0000000 --- a/codimd/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# CodiMD - -> Realtime collaborative markdown notes on all platforms. -> -> CodiMD lets you collaborate in real-time with markdown. Built on HackMD source -> code, CodiMD lets you host and control your team's content with speed and -> ease. -> -> -- [Github][github] - -Voici [le dépôt github][github] et l'image docker utilisé. - -## Configuration - -```sh -cp .env.example .env -``` - -Modifier la configuration pour son propre serveur et lancer le service : - -```sh -docker-compose up -d -``` - -## Backup - -Lancer le script de backup : - -``` -./backup.sh -``` - -## Restore - -Lancer le script de restauration d'un backup : - -```sh -./recovery.sh -# or -./recovery.sh 2020_03_09 -``` - -[docker]: https://github.com/linuxserver/docker-codimd -[github]: https://github.com/codimd/server diff --git a/codimd/docker-compose.postgres.yml b/codimd/docker-compose.postgres.yml deleted file mode 100644 index 4777efa..0000000 --- a/codimd/docker-compose.postgres.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: "3.8" - -volumes: - postgres: - name: ${POSTGRES_VOLUME_NAME} - -services: - codimd-postgres: - container_name: ${POSTGRES_CONTAINER_NAME} - image: ${POSTGRES_IMAGE} - restart: always - environment: - POSTGRES_USER: ${POSTGRES_USER} - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - POSTGRES_DB: ${POSTGRES_DB} - volumes: - - postgres:/var/lib/postgresql/data - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro diff --git a/codimd/docker-compose.traefik.yml b/codimd/docker-compose.traefik.yml deleted file mode 100644 index 32a30a3..0000000 --- a/codimd/docker-compose.traefik.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: "3.8" - -networks: - default: - name: ${TRAEFIK_NETWORK_NAME} - -services: - codimd: - labels: - traefik.enable: 'true' - traefik.docker.network: ${TRAEFIK_NETWORK_NAME} - traefik.http.routers.codimd.rule: 'Host(`${CODIMD_DOMAIN}`)' - traefik.http.routers.codimd.entrypoints: 'web' diff --git a/codimd/docker-compose.yml b/codimd/docker-compose.yml deleted file mode 100644 index adf8934..0000000 --- a/codimd/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: "3.8" - -volumes: - codimd: - name: ${CODIMD_VOLUME_NAME} - -services: - codimd: - container_name: ${CODIMD_CONTAINER_NAME} - image: ${CODIMD_IMAGE} - restart: always - depends_on: - - codimd-postgres - volumes: - - codimd:/config - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - environment: - CMD_DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@codimd-postgres:5432/${POSTGRES_DB} - CMD_DOMAIN: ${CODIMD_DOMAIN} - NODE_ENV: ${NODE_ENV} - CMD_PROTOCOL_USESSL: ${CMD_PROTOCOL_USESSL} - # PGID: 995 - # PUID: 995 diff --git a/codimd/run b/codimd/run deleted file mode 100644 index 7951392..0000000 --- a/codimd/run +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -eu - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -. $DIR/../help.sh -. $DIR/../postgres/run --only-source - -codimd_help() { - echo "./run backup : Lancement de la sauvegarde de Codimd" - echo "./run restore : Restauration de la sauvegarde de Codimd" -} - -codimd_backup() { - script_env - BACKUP_DATE_DEFAULT=`date +%Y%m%d_%H%M%S` - BACKUP_DATE=${BACKUP_DATE:-$BACKUP_DATE_DEFAULT} - backup_folder_create - - POSTGRES_BACKUP_FILE=backups/${BACKUP_DATE}_${CODIMD_DOMAIN}_postgres.sql - postgres_backup - - docker run -it --rm -v $HOME/backups/${CODIMD_DOMAIN}:/backup --volumes-from codimd alpine:3.12.3 ash -c "cd config && tar cvf /backup/${BACKUP_DATE}_${CODIMD_DOMAIN}_config.tar ." -} - -codimd_restore() { - script_env - - postgres_restore - docker run -it --rm -v $HOME/backups/${CODIMD_DOMAIN}:/backup --volumes-from codimd alpine:3.12.3 ash -c "cd /config && tar xvf /backup/${BACKUP_DATE}_${CODIMD_DOMAIN}_config.tar --strip 1" -} - -if [ $# -ge 1 ]; then - if [ "${1}" == "backup" ]; then - script_start - codimd_backup - script_end - elif [ "${1}" == "restore" ]; then - script_start - codimd_restore - script_end - elif [ "${1}" != "--only-source" ]; then - codimd_help - fi -else - codimd_help -fi