diff --git a/composer/docker-compose-injected.yaml b/composer/docker-compose-injected.yaml deleted file mode 100644 index 7a4ecf86..00000000 --- a/composer/docker-compose-injected.yaml +++ /dev/null @@ -1,193 +0,0 @@ -# -# TODO: prepare connection to git for push upstream stuff !!! -# TODO: use fresh and empty database volume from scratch !! -# TODO: need to have local .git and git submodules for the correct treatment of git push upstream functionality -# - -# Start up database and webserver -# initialize webserver -# copy out to live - - -services: - -## a database running of a volume which is part of the container - database: - image: mariadb:10.5 - ports: - - "3306:3306" - container_name: dante-mariadb-container - networks: - - dante-network - secrets: - - configuration - environment: - MARIADB_ROOT_PASSWORD: initialPassword - - -## a database running off a named volume - database-volume: - image: mariadb:10.5 - ports: - - "3306:3306" - container_name: dante-mariadb-container - networks: - - dante-network - secrets: - - configuration - volumes: - - data:/var/lib/mysql - environment: - MARIADB_ROOT_PASSWORD: initialPassword - - - copy-to-host: - image: dante-wiki:latest - build: ../images/dante-wiki/src - container_name: dante-copy-container - restart: "no" - volumes: - - ../live:/mnt - secrets: - - configuration - networks: - - dante-network - command: "prepare-database.sh get-dante.sh get-parsifal.sh generate-mediawiki-private.sh init.sh copy-out.sh shutdown.sh" - -# NOTE: we add a shutdown.sh for the copy-to-host service so that the webserver may start up -# If we need to debug some stuff, we can also remove it for a moment - -# NOTE: wait for mysql not via health check but via script, since we want a more fine granular control over this -# than seems to work with the docker healthcheck approach - - -# get dante and parsifal twice. -# once before generating the copy so that we have it in place before init.sh for the update scripts etc. -# a second time in webserver-after-copy, to be sure that we have the freshest version even when we did not redo the complete copy cycle - -## todo: why do we need get-ante and get-parsifal twice?? -## is the depends_on really working here or is it superfluous?? - webserver-after-copy: - environment: - - COMPOSER_IDENTITY=webserver-after-copy - - IMAGE_ID="3c4d7f36eafe" - - IMAGE_DIGEST="" - - IMAGE_REPOSITORY="dante-wiki" - - IMAGE_CREATED_AT="2024-10-27 17:15:54 +0100 CET" - - IMAGE_TAG="=latest" - - image: dante-wiki:latest - container_name: dante-wiki-container - depends_on: - copy-to-host: - condition: service_completed_successfully - volumes: - - ../live:/var/www/html - ports: - - "8080:80" - - "4443:443" - secrets: - - configuration - networks: - dante-network: - aliases: - - dante.local - command: "install-webserver-certificate.sh get-dante.sh get-parsifal.sh generate-mediawiki-private.sh chown.sh set-user-preferences.sh initial-xml-git.sh run-apache-no-cache.sh" - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] - interval: 30s - timeout: 10s - retries: 5 - - -## starts a container which has not been initialized but which does not require a copy to the development environment -## runs not off a volume but off the container itself - webserver-raw: - environment: - - COMPOSER_IDENTITY=webserver-raw - image: dante-wiki:latest - container_name: dante-wiki-container - ports: - - "8080:80" - - "4443:443" - secrets: - - configuration - networks: - dante-network: - aliases: - - dante.local - command: "prepare-database.sh install-webserver-certificate.sh get-dante.sh get-parsifal.sh generate-mediawiki-private.sh init.sh set-user-preferences.sh initial-xml-git.sh run-apache-no-cache.sh" - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] - interval: 30s - timeout: 10s - retries: 5 - -## starts a container and does all the work for preparing a - webserver-stemcell: - environment: - - COMPOSER_IDENTITY=webserver-stemcell - image: dante-wiki:latest - container_name: dante-wiki-container - ports: - - "8080:80" - - "4443:443" - secrets: - - configuration - networks: - dante-network: - aliases: - - dante.local - command: "prepare-database.sh install-webserver-certificate.sh get-dante.sh get-parsifal.sh" - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] - interval: 30s - timeout: 10s - retries: 5 - - - -## start a container which has already been initialized - webserver-cooked: - environment: - - COMPOSER_IDENTITY=webserver-cooked - image: dante-wiki:cooked - container_name: dante-wiki-container - ports: - - "8080:80" - - "4443:443" - secrets: - - configuration - networks: - dante-network: - aliases: - - dante.local - command: "prepare-database.sh restore-initial-sql.sh chown.sh run-apache-no-cache.sh" - -# TODO: waiting for mysql: maybe we can put this into a health check ?!?!? in a better way than thus far ???? - - - phpmyadmin: - image: phpmyadmin:5.2.1 - ports: - - "9090:80" - container_name: php-myadmin-container - networks: - dante-network: - aliases: - - phpmyadmin.local - environment: - PMA_HOST: dante-mariadb-container - depends_on: - - database - -networks: - dante-network: - -volumes: - data: - external: true - -secrets: - configuration: - file: ../private/configuration.sh \ No newline at end of file diff --git a/images/dante-wiki/src/home/dante/dantescript/copy-out.sh b/images/dante-wiki/src/home/dante/dantescript/copy-out.sh index 6b203921..861d6b68 100755 --- a/images/dante-wiki/src/home/dante/dantescript/copy-out.sh +++ b/images/dante-wiki/src/home/dante/dantescript/copy-out.sh @@ -33,13 +33,7 @@ printf "\n\n*** copy-out.sh: copying out...\n" exec 1>&1 2>&2 printf "DONE cleaning up old stuff\n" -printf "\n*** copy-out.sh: Copying in index.html and favicon.ico and error404.php to /mnt ..." - cp /home/dante/html/index.html /mnt - cp /home/dante/html/favicon.ico /mnt - cp /home/dante/html/error.php /mnt - exec 1>&1 2>&2 -printf "DONE\n" diff --git a/images/dante-wiki/src/home/dante/dantescript/init.sh b/images/dante-wiki/src/home/dante/dantescript/init.sh index f4ce93dd..a2daf7d5 100755 --- a/images/dante-wiki/src/home/dante/dantescript/init.sh +++ b/images/dante-wiki/src/home/dante/dantescript/init.sh @@ -7,6 +7,17 @@ source /home/dante/dantescript/common-defs.sh printf "${GREEN}*** THIS IS /dantescript/init.sh ***** ${RESET}" +printf "\n*** init.sh: Copying index.html, favicon.ico and error404.php to ${MOUNT}..." + cp /home/dante/html/index.html ${MOUNT} + cp /home/dante/html/favicon.ico ${MOUNT} + cp /home/dante/html/error.php ${MOUNT} + exec 1>&1 2>&2 +printf "DONE\n" + + + + + # check if we already have a LocalSettings.php if [ -e "${MOUNT}/${TARGET}/LocalSettings.php" ]; then printf "${GREEN} *** init.sh finds the system already in initialized state - exiting init.sh\n" diff --git a/images/dante-wiki/src/home/dante/html/README.md b/images/dante-wiki/src/home/dante/html/README.md index 41e34a31..b839f8e8 100644 --- a/images/dante-wiki/src/home/dante/html/README.md +++ b/images/dante-wiki/src/home/dante/html/README.md @@ -1,6 +1,6 @@ -index.html Provides a generic homepage / index page for a smooth entry, in case the suer only typed the short form of the URL. +index.html Provides a generic redirect. error404.php Provides an error page which also mentions the URL which was not found. This is needed for some forms of debugging. diff --git a/images/dante-wiki/src/home/dante/html/index.html b/images/dante-wiki/src/home/dante/html/index.html index cb24febe..ceb95418 100644 --- a/images/dante-wiki/src/home/dante/html/index.html +++ b/images/dante-wiki/src/home/dante/html/index.html @@ -1,20 +1,13 @@ - + + - - + + + Redirecting... - - - - + \ No newline at end of file