From 15e3853d42c25d216945a8d60e85905256f5c379 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 5 May 2025 11:59:26 -0700 Subject: [PATCH] Convert all `stack.yml` to `compose.yaml` Docker Swarm Mode has been in severely declining usage and maintenance for years now. Meanwhile, Docker Compose has had quite a lot of changes (notably deprecating the `version:` field required by Swarm / forward compatibility). As a result, it no longer makes a ton of sense for us to prefer/suggest Swarm usages. This changes all references to be `compose.yaml` (the upstream-preferred canonical filename: https://github.com/compose-spec/compose-go/blob/9a9cc5d9c3453326bb8d506259bcfccd68af110b/cli/options.go#L384-L385) directly, leaving "swarm compatibility" as an exercise for the minority of readers who might still need/want it. Unfortunately, this also means we need to remove all the play-with-docker links (since it only supports stack deploy via URL arguments, not compose), but my experience with that service is that it hasn't been terribly performant for a while, so I don't think this is a huge loss. (There were also a few trailing references to the long-since-defunct Docker Machine project which have also been cleaned up.) --- .ci/check-ymlfmt.sh | 2 +- .template-helpers/compose.md | 6 ++--- .template-helpers/stack.md | 7 ------ README.md | 8 +++---- adminer/{stack.yml => compose.yaml} | 2 -- adminer/content.md | 4 ++-- backdrop/compose.yaml | 15 ++++++++++++ backdrop/content.md | 21 +---------------- bonita/{stack.yml => compose.yaml} | 0 bonita/content.md | 4 ++-- drupal/{stack.yml => compose.yaml} | 3 --- drupal/content.md | 4 ++-- elasticsearch/{stack.yml => compose.yaml} | 2 -- friendica/{stack.yml => compose.yaml} | 2 -- friendica/content.md | 2 -- geonetwork/{stack.yml => compose.yaml} | 4 +--- geonetwork/content.md | 6 ++--- ghost/{stack.yml => compose.yaml} | 2 -- ghost/content.md | 6 ++--- joomla/{stack.yml => compose.yaml} | 0 joomla/content.md | 4 ++-- kibana/{stack.yml => compose.yaml} | 3 --- krakend/content.md | 4 +--- mariadb/{stack.yml => compose.yaml} | 1 - mariadb/content.md | 6 ++--- mediawiki/{stack.yml => compose.yaml} | 1 - mediawiki/content.md | 4 ++-- mongo-express/content.md | 2 +- mongo/{stack.yml => compose.yaml} | 1 - mongo/content.md | 7 +++--- mysql/{stack.yml => compose.yaml} | 1 - mysql/content.md | 4 ++-- nextcloud/content.md | 12 ++++------ nginx/content.md | 4 ++-- odoo/content.md | 9 +++----- percona/{stack.yml => compose.yaml} | 1 - percona/content.md | 4 ++-- phpmyadmin/{stack.yml => compose.yaml} | 2 -- phpmyadmin/content.md | 2 +- postfixadmin/{stack.yml => compose.yaml} | 2 -- postfixadmin/content.md | 4 ++-- postgres/{stack.yml => compose.yaml} | 3 +-- postgres/content.md | 8 +++---- redmine/{stack.yml => compose.yaml} | 2 -- redmine/content.md | 4 ++-- ros/content.md | 22 ++++++++---------- storm/{stack.yml => compose.yaml} | 2 -- storm/content.md | 4 ++-- teamspeak/{stack.yml => compose.yaml} | 1 - teamspeak/content.md | 4 ++-- update.sh | 28 ++++------------------- wordpress/{stack.yml => compose.yaml} | 0 wordpress/content.md | 4 ++-- yourls/{stack.yml => compose.yaml} | 2 -- yourls/content.md | 4 ++-- zookeeper/{stack.yml => compose.yaml} | 2 -- zookeeper/content.md | 4 ++-- 57 files changed, 97 insertions(+), 175 deletions(-) delete mode 100644 .template-helpers/stack.md rename adminer/{stack.yml => compose.yaml} (93%) create mode 100644 backdrop/compose.yaml rename bonita/{stack.yml => compose.yaml} (100%) rename drupal/{stack.yml => compose.yaml} (90%) rename elasticsearch/{stack.yml => compose.yaml} (87%) rename friendica/{stack.yml => compose.yaml} (98%) rename geonetwork/{stack.yml => compose.yaml} (96%) rename ghost/{stack.yml => compose.yaml} (98%) rename joomla/{stack.yml => compose.yaml} (100%) rename kibana/{stack.yml => compose.yaml} (86%) rename mariadb/{stack.yml => compose.yaml} (94%) rename mediawiki/{stack.yml => compose.yaml} (93%) rename mongo/{stack.yml => compose.yaml} (97%) rename mysql/{stack.yml => compose.yaml} (93%) rename percona/{stack.yml => compose.yaml} (94%) rename phpmyadmin/{stack.yml => compose.yaml} (93%) rename postfixadmin/{stack.yml => compose.yaml} (97%) rename postgres/{stack.yml => compose.yaml} (86%) rename redmine/{stack.yml => compose.yaml} (95%) rename storm/{stack.yml => compose.yaml} (96%) rename teamspeak/{stack.yml => compose.yaml} (97%) rename wordpress/{stack.yml => compose.yaml} (100%) rename yourls/{stack.yml => compose.yaml} (95%) rename zookeeper/{stack.yml => compose.yaml} (97%) diff --git a/.ci/check-ymlfmt.sh b/.ci/check-ymlfmt.sh index 5315948d9..161f4f54c 100755 --- a/.ci/check-ymlfmt.sh +++ b/.ci/check-ymlfmt.sh @@ -3,7 +3,7 @@ set -Eeuo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.." -files="$(find -name '*.yml' -not -path './.github/*')" +files="$(find '(' -name '*.yml' -o -name '*.yaml' ')' -not -path './.github/*')" need=() needdiff= for f in $files; do diff --git a/.template-helpers/compose.md b/.template-helpers/compose.md index 901a1af15..ef16614cd 100644 --- a/.template-helpers/compose.md +++ b/.template-helpers/compose.md @@ -1,5 +1,5 @@ -... via [`docker-compose`](https://github.com/docker/compose) +... via [`docker compose`](https://github.com/docker/compose) -Example `docker-compose.yml` for `%%REPO%%`: +Example `compose.yaml` for `%%REPO%%`: -%%COMPOSE-YML%% +%%COMPOSE-YAML%% diff --git a/.template-helpers/stack.md b/.template-helpers/stack.md deleted file mode 100644 index 2ceda127f..000000000 --- a/.template-helpers/stack.md +++ /dev/null @@ -1,7 +0,0 @@ -... via [`docker-compose`](https://github.com/docker/compose) or [`docker stack deploy`](https://docs.docker.com/engine/reference/commandline/stack_deploy/) - -Example `docker-compose.yml` for `%%REPO%%`: - -%%STACK-YML%% - -[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=%%STACK-URL%%) diff --git a/README.md b/README.md index 823336ccd..9b6a68746 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ All Markdown files here are run through [tianon's fork of `markdownfmt`](https:/ 8. [`maintainer.md`](#maintainermd) 9. [`metadata.json`](#metadatajson) 10. [`README-short.txt`](#readme-shorttxt) - 11. [`stack.yml`](#stackyml) + 11. [`compose.yaml`](#composeyaml) 5. [Files for main Docs repo](#files-for-main-docs-repo) 1. [`update.sh`](#updatesh) 2. [`markdownfmt.sh` and `ymlfmt.sh`](#markdownfmtsh-and-ymlfmtsh) @@ -148,11 +148,11 @@ This is the short description for the Docker Hub, limited to 100 characters in a > Go (golang) is a general purpose, higher-level, imperative programming language. -## `stack.yml` +## `compose.yaml` -This optional file contains a small, working [Compose file for Docker Swarm](https://docs.docker.com/compose/compose-file/compose-file-v3/) showing off how to use the image. To use the `stack.yml`, add `%%STACK%%` to the `content.md` and this will embed the YAML along with a link to directly try it in [Play with Docker](https://labs.play-with-docker.com/). +This optional file contains a small, working [Compose file](https://docs.docker.com/reference/compose-file/) showing off how to use the image. To use the `compose.yaml`, add `%%COMPOSE%%` to the `content.md` and this will embed the YAML. -The file must work via `docker stack deploy` since that is how Play with Docker will launch it, but it is helpful for users to try locally if it works for `docker-compose` as well. Other official images may be referenced within the YAML to demonstrate the functionality of the image, but no images external to the Docker Official Images program may be referenced. +Other official images may be referenced within the YAML to demonstrate the functionality of the image, but no images external to the Docker Official Images program may be referenced. # Files for main Docs repo diff --git a/adminer/stack.yml b/adminer/compose.yaml similarity index 93% rename from adminer/stack.yml rename to adminer/compose.yaml index 56aa33b59..8cff90103 100644 --- a/adminer/stack.yml +++ b/adminer/compose.yaml @@ -1,7 +1,5 @@ # Use root/example as user/password credentials -version: '3.1' - services: adminer: diff --git a/adminer/content.md b/adminer/content.md index 8ff169183..d38e5286a 100644 --- a/adminer/content.md +++ b/adminer/content.md @@ -30,9 +30,9 @@ Then point your web server to port 9000 of the container. Note: This exposes the FastCGI socket to the Internet. Make sure to add proper firewall rules or use a private Docker network instead to prevent a direct access. -### %%STACK%% +### %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ### Loading plugins diff --git a/backdrop/compose.yaml b/backdrop/compose.yaml new file mode 100644 index 000000000..38ef8693c --- /dev/null +++ b/backdrop/compose.yaml @@ -0,0 +1,15 @@ +services: + backdrop: + image: backdrop + links: + - db:mysql + ports: + - 8080:80 + + db: + image: mysql + environment: + MYSQL_USER: backdrop + MYSQL_PASSWORD: backdrop + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + MYSQL_DATABASE: backdrop diff --git a/backdrop/content.md b/backdrop/content.md index 51dee9d11..68cf928fa 100644 --- a/backdrop/content.md +++ b/backdrop/content.md @@ -44,26 +44,7 @@ $ docker run --name some-%%REPO%% \ -d %%REPO%% ``` -## ... via [Docker Compose](https://github.com/docker/compose) - -Example `compose.yaml` for `%%REPO%%`: - -```yaml -%%REPO%%: - image: %%REPO%% - links: - - db:mysql - ports: - - 8080:80 - -db: - image: mysql - environment: - MYSQL_USER: %%REPO%% - MYSQL_PASSWORD: %%REPO%% - MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' - MYSQL_DATABASE: %%REPO%% -``` +## %%COMPOSE%% Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080`. diff --git a/bonita/stack.yml b/bonita/compose.yaml similarity index 100% rename from bonita/stack.yml rename to bonita/compose.yaml diff --git a/bonita/content.md b/bonita/content.md index e074fd7e7..a904c550a 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -36,9 +36,9 @@ docker run --name mydbpostgres -h -d bonitasoft/bonita-postgres:16.4 This image is built from the following [GitHub repository](https://github.com/Bonitasoft-Community/bonita-database-docker/tree/main/postgres/16), which can be further adapted/customized to suit your needs. -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). - Replace `` with the one used in the licence generation command - leave double `$$` untouched diff --git a/drupal/stack.yml b/drupal/compose.yaml similarity index 90% rename from drupal/stack.yml rename to drupal/compose.yaml index df58e27bc..ef31c50ae 100644 --- a/drupal/stack.yml +++ b/drupal/compose.yaml @@ -1,7 +1,6 @@ # Drupal with PostgreSQL # # Access via "http://localhost:8080" -# (or "http://$(docker-machine ip):8080" if using docker-machine) # # During initial Drupal setup, # Database type: PostgreSQL @@ -10,8 +9,6 @@ # Database password: example # ADVANCED OPTIONS; Database host: postgres -version: '3.1' - services: drupal: diff --git a/drupal/content.md b/drupal/content.md index 271b69e2b..bb0b00b51 100644 --- a/drupal/content.md +++ b/drupal/content.md @@ -98,9 +98,9 @@ $ docker run --name some-%%REPO%% --network some-network -d \ %%IMAGE%% ``` -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). When installing select `postgres` as database with the following parameters: `dbname=postgres` `user=postgres` `pass=example` `hostname=postgres` +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). When installing select `postgres` as database with the following parameters: `dbname=postgres` `user=postgres` `pass=example` `hostname=postgres` ## Adding additional libraries / extensions diff --git a/elasticsearch/stack.yml b/elasticsearch/compose.yaml similarity index 87% rename from elasticsearch/stack.yml rename to elasticsearch/compose.yaml index ea77eb1a3..d0c50078f 100644 --- a/elasticsearch/stack.yml +++ b/elasticsearch/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: elasticsearch: diff --git a/friendica/stack.yml b/friendica/compose.yaml similarity index 98% rename from friendica/stack.yml rename to friendica/compose.yaml index 8248c0f8a..4f963ad2d 100644 --- a/friendica/stack.yml +++ b/friendica/compose.yaml @@ -1,5 +1,3 @@ -version: '3.2' - services: db: image: mariadb diff --git a/friendica/content.md b/friendica/content.md index 321a87e73..4914cbbb5 100644 --- a/friendica/content.md +++ b/friendica/content.md @@ -12,8 +12,6 @@ The `apache` tag contains a full Friendica installation including an apache web The second option is a `fpm` container. It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Friendica server. To use this image it must be combined with any Webserver that can proxy the http requests to the FastCGI-port of the container. -[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=%%STACK-URL%%) (Admin-E-Mail: `root@friendica.local`) - ## Using the apache image You need at least one other mariadb/mysql-container to link it to Friendica. diff --git a/geonetwork/stack.yml b/geonetwork/compose.yaml similarity index 96% rename from geonetwork/stack.yml rename to geonetwork/compose.yaml index 6f05a5bbe..2f2a7a814 100644 --- a/geonetwork/stack.yml +++ b/geonetwork/compose.yaml @@ -1,12 +1,10 @@ # GeoNetwork # -# Access via "http://localhost:8080/geonetwork" (or "http://$(docker-machine ip):8080/geonetwork" if using docker-machine) +# Access via "http://localhost:8080/geonetwork" # # Default user: admin # Default password: admin -version: '3.8' - volumes: geonetwork: esdata: diff --git a/geonetwork/content.md b/geonetwork/content.md index 752eccf8c..e35547e56 100644 --- a/geonetwork/content.md +++ b/geonetwork/content.md @@ -118,7 +118,7 @@ GeoNetwork listens on port `8080`. If you want to access the container at the ho docker run --name some-%%REPO%% -d -p 8080:8080 %%IMAGE%% ``` -Then, if you are running docker on Linux, you may access geonetwork at http://localhost:8080/geonetwork. Otherwise, replace `localhost` by the address of your docker machine. +Then, if you are running docker on Linux, you may access geonetwork at http://localhost:8080/geonetwork. ### Set the data directory and H2 db file @@ -162,9 +162,9 @@ docker run --name some-%%REPO%% -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data docker run --name some-%%REPO%% -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/%%REPO%%-docker:/catalogue-data %%IMAGE%% ``` -### %%STACK%% +### %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080/geonetwork`, `http://localhost:8080/geonetwork`, or `http://host-ip:8080/geonetwork` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080/geonetwork` or `http://host-ip:8080/geonetwork` (as appropriate). ### Default credentials diff --git a/ghost/stack.yml b/ghost/compose.yaml similarity index 98% rename from ghost/stack.yml rename to ghost/compose.yaml index fcf777580..4fd4097e3 100644 --- a/ghost/stack.yml +++ b/ghost/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: ghost: diff --git a/ghost/content.md b/ghost/content.md index f47d8dcb9..7c20e0870 100644 --- a/ghost/content.md +++ b/ghost/content.md @@ -68,7 +68,7 @@ All Ghost configuration parameters (such as `url`) can be specified via environm $ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://some-ghost.example.com %%IMAGE%% ``` -(There are further configuration examples in the `stack.yml` listed below.) +(There are further configuration examples in the `compose.yaml` listed below.) ## What is the Node.js version? @@ -89,6 +89,6 @@ To run Ghost for production you'll also need to be running with MySQL 8, https, The following example demonstrates some of the necessary configuration for running with MySQL. For more detail, see [Ghost's "Configuration options" documentation](https://ghost.org/docs/config/#configuration-options). -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). diff --git a/joomla/stack.yml b/joomla/compose.yaml similarity index 100% rename from joomla/stack.yml rename to joomla/compose.yaml diff --git a/joomla/content.md b/joomla/content.md index 807947500..42e6dedd1 100644 --- a/joomla/content.md +++ b/joomla/content.md @@ -50,9 +50,9 @@ $ docker run --name some-%%REPO%% --network some-network -e JOOMLA_DB_HOST=10.1. -e JOOMLA_DB_USER=... -e JOOMLA_DB_PASSWORD=... -d %%IMAGE%% ``` -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ## Adding additional libraries / extensions diff --git a/kibana/stack.yml b/kibana/compose.yaml similarity index 86% rename from kibana/stack.yml rename to kibana/compose.yaml index a1139cb26..6adbea8fa 100644 --- a/kibana/stack.yml +++ b/kibana/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: kibana: @@ -9,4 +7,3 @@ services: elasticsearch: image: elasticsearch - diff --git a/krakend/content.md b/krakend/content.md index 0dedadd7c..37ac86b64 100644 --- a/krakend/content.md +++ b/krakend/content.md @@ -108,10 +108,9 @@ The configuration above assumes you have a folder structure like the following: ### Docker Compose example -Finally, a simple `docker-compose` file to start KrakenD with your API would be: +Finally, a simple `docker compose` file to start KrakenD with your API would be: ```yaml -version: "3" services: krakend: image: %%IMAGE%%: @@ -124,7 +123,6 @@ services: And another one that uses the flexible configuration and a custom template filename (`my_krakend.tmpl`) on each start: ```yaml -version: "3" services: krakend: image: %%IMAGE%%: diff --git a/mariadb/stack.yml b/mariadb/compose.yaml similarity index 94% rename from mariadb/stack.yml rename to mariadb/compose.yaml index d5b571712..25409b7e2 100644 --- a/mariadb/stack.yml +++ b/mariadb/compose.yaml @@ -1,5 +1,4 @@ # Use root/example as user/password credentials -version: '3.1' services: diff --git a/mariadb/content.md b/mariadb/content.md index 54c14d98f..a80e3cfe5 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -34,9 +34,9 @@ $ docker run --detach --name some-%%REPO%% --env MARIADB_RANDOM_ROOT_PASSWORD=1 ... where the container logs will contain the generated root password. -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ### Start a `%%IMAGE%%` server instance with user, password and database @@ -208,7 +208,7 @@ The `-v /my/own/datadir:/var/lib/mysql:Z` part of the command mounts the `/my/ow ## No connections until MariaDB init completes -If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as `docker-compose`, which start several containers simultaneously. +If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as `docker compose`, which start several containers simultaneously. ## Health/Liveness/Readiness Checking diff --git a/mediawiki/stack.yml b/mediawiki/compose.yaml similarity index 93% rename from mediawiki/stack.yml rename to mediawiki/compose.yaml index 05c7e29b5..7df22965b 100644 --- a/mediawiki/stack.yml +++ b/mediawiki/compose.yaml @@ -1,7 +1,6 @@ # MediaWiki with MariaDB # # Access via "http://localhost:8080" -# (or "http://$(docker-machine ip):8080" if using docker-machine) services: mediawiki: image: mediawiki diff --git a/mediawiki/content.md b/mediawiki/content.md index e5fe6fccf..5242a2547 100644 --- a/mediawiki/content.md +++ b/mediawiki/content.md @@ -46,9 +46,9 @@ The paths `/var/www/html/images` and `/var/www/html/LocalSettings.php` are thing $ docker run --rm %%IMAGE%% tar -cC /var/www/html/sites . | tar -xC /path/on/host/sites ``` -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ## Adding additional libraries / extensions diff --git a/mongo-express/content.md b/mongo-express/content.md index 13b6df497..566d512a7 100644 --- a/mongo-express/content.md +++ b/mongo-express/content.md @@ -64,4 +64,4 @@ $ docker run -it --rm \ %%IMAGE%% ``` -This example links to a container name typical of `docker-compose`, changes the editor's color theme, and enables basic authentication. +This example links to a container name typical of `docker compose`, changes the editor's color theme, and enables basic authentication. diff --git a/mongo/stack.yml b/mongo/compose.yaml similarity index 97% rename from mongo/stack.yml rename to mongo/compose.yaml index 36c186bbe..a49a3d6ff 100644 --- a/mongo/stack.yml +++ b/mongo/compose.yaml @@ -1,5 +1,4 @@ # Use root/example as user/password credentials -version: '3.1' services: diff --git a/mongo/content.md b/mongo/content.md index b7d39f4b3..0bec7ae13 100644 --- a/mongo/content.md +++ b/mongo/content.md @@ -32,9 +32,9 @@ $ docker run -it --network some-network --rm %%IMAGE%% mongosh --host some-%%REP ... where `some-%%REPO%%` is the name of your original `mongo` container. -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8081`, `http://localhost:8081`, or `http://host-ip:8081` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8081` or `http://host-ip:8081` (as appropriate). ## Container shell access and viewing MongoDB logs @@ -62,10 +62,9 @@ Most MongoDB configuration can be set through flags to `mongod`. The entrypoint $ docker run --name some-%%REPO%% -d %%IMAGE%% --serviceExecutor adaptive ``` -And here is the same with a `docker-compose.yml` file +And here is the same with a `compose.yaml` file ```yaml -version: '3.1' services: mongo: image: %%IMAGE%% diff --git a/mysql/stack.yml b/mysql/compose.yaml similarity index 93% rename from mysql/stack.yml rename to mysql/compose.yaml index bdb35f606..28abad846 100644 --- a/mysql/stack.yml +++ b/mysql/compose.yaml @@ -1,5 +1,4 @@ # Use root/example as user/password credentials -version: '3.1' services: diff --git a/mysql/content.md b/mysql/content.md index cfac0ff4d..0e24f5399 100644 --- a/mysql/content.md +++ b/mysql/content.md @@ -36,9 +36,9 @@ $ docker run -it --rm %%IMAGE%% mysql -hsome.mysql.host -usome-mysql-user -p More information about the MySQL command line client can be found in the [MySQL documentation](http://dev.mysql.com/doc/en/mysql.html) -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ## Container shell access and viewing MySQL logs diff --git a/nextcloud/content.md b/nextcloud/content.md index b83b13472..a290b3e39 100644 --- a/nextcloud/content.md +++ b/nextcloud/content.md @@ -32,11 +32,11 @@ To use the fpm image, you need an additional web server, such as [nginx](https:/ $ docker run -d %%IMAGE%%:fpm ``` -As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the [Docker Compose section](#running-this-image-with-docker-compose). +As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the Docker Compose section. ## Using an external database -By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the docker-compose section. +By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the Docker Compose section. ## Persistent data @@ -106,10 +106,10 @@ To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/ $ docker exec --user www-data CONTAINER_ID php occ ``` -or for docker-compose: +or for `docker compose`: ```console -$ docker-compose exec --user www-data app php occ +$ docker compose exec --user www-data app php occ ``` ## Auto configuration via environment variables @@ -157,7 +157,7 @@ You might want to make sure the htaccess is up to date after each container upda - `NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization. -If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container, pass in the following parameters: +If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your Compose file. To inform Nextcloud about the Redis container, pass in the following parameters: - `REDIS_HOST` (not set by default) Name of Redis container - `REDIS_HOST_PORT` (default: `6379`) Optional port for Redis, only use for external Redis servers that run on non-standard ports. @@ -381,8 +381,6 @@ Then run `docker compose up -d`, now you can access Nextcloud at http://localhos As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/` files. For example: ```yaml -version: '3.2' - services: db: image: postgres diff --git a/nginx/content.md b/nginx/content.md index f933a5baa..65fb24e8c 100644 --- a/nginx/content.md +++ b/nginx/content.md @@ -75,7 +75,7 @@ $ docker run --name my-custom-nginx-container -d custom-nginx Out-of-the-box, %%IMAGE%% doesn't support environment variables inside most configuration blocks. But this image has a function, which will extract environment variables before %%IMAGE%% starts. -Here is an example using docker-compose.yml: +Here is an example using `compose.yaml`: ```yaml web: @@ -131,7 +131,7 @@ Images since version 1.9.8 come with `nginx-debug` binary that produces verbose $ docker run --name my-nginx -v /host/path/nginx.conf:/etc/nginx/nginx.conf:ro -d %%IMAGE%% nginx-debug -g 'daemon off;' ``` -Similar configuration in docker-compose.yml may look like this: +Similar configuration in `compose.yaml` may look like this: ```yaml web: diff --git a/odoo/content.md b/odoo/content.md index 8e45e2c3f..db07cef10 100644 --- a/odoo/content.md +++ b/odoo/content.md @@ -101,10 +101,9 @@ Tweak these environment variables to easily connect to a postgres server: ## Docker Compose examples -The simplest `docker-compose.yml` file would be: +The simplest `compose.yaml` file would be: ```yml -version: '3.1' services: web: image: %%IMAGE%%:17.0 @@ -123,7 +122,6 @@ services: If the default postgres credentials does not suit you, tweak the environment variables: ```yml -version: '3.1' services: web: image: %%IMAGE%%:17.0 @@ -151,7 +149,6 @@ Here's a last example showing you how to - use a `secrets` file named `odoo_pg_pass` that contains the postgreql password shared by both services ```yml -version: '3.1' services: web: image: %%IMAGE%%:17.0 @@ -187,10 +184,10 @@ secrets: file: odoo_pg_pass ``` -To start your Odoo instance, go in the directory of the `docker-compose.yml` file you created from the previous examples and type: +To start your Odoo instance, go in the directory of the `compose.yaml` file you created from the previous examples and type: ```console -docker-compose up -d +docker compose up -d ``` # How to upgrade this image diff --git a/percona/stack.yml b/percona/compose.yaml similarity index 94% rename from percona/stack.yml rename to percona/compose.yaml index 9390e2f93..60a9ed77b 100644 --- a/percona/stack.yml +++ b/percona/compose.yaml @@ -1,5 +1,4 @@ # Use root/example as user/password credentials -version: '3.1' services: diff --git a/percona/content.md b/percona/content.md index b85f8afe2..9e02530ce 100644 --- a/percona/content.md +++ b/percona/content.md @@ -38,9 +38,9 @@ $ docker run -it --rm %%IMAGE%% mysql -hsome.mysql.host -usome-mysql-user -p More information about the MySQL command line client can be found in the [MySQL documentation](http://dev.mysql.com/doc/en/mysql.html) -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ## Container shell access and viewing MySQL logs diff --git a/phpmyadmin/stack.yml b/phpmyadmin/compose.yaml similarity index 93% rename from phpmyadmin/stack.yml rename to phpmyadmin/compose.yaml index b31102394..56a767430 100644 --- a/phpmyadmin/stack.yml +++ b/phpmyadmin/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: db: image: mariadb:10.11 diff --git a/phpmyadmin/content.md b/phpmyadmin/content.md index b3b15f25a..3b7c4f0f8 100644 --- a/phpmyadmin/content.md +++ b/phpmyadmin/content.md @@ -66,7 +66,7 @@ docker run --name phpmyadmin -d -e PMA_ARBITRARY=1 -p 8080:80 %%IMAGE%% This will run phpMyAdmin with the arbitrary server option - allowing you to specify any MySQL/MariaDB server on the login page. -%%STACK%% +%%COMPOSE%% ## Adding Custom Configuration diff --git a/postfixadmin/stack.yml b/postfixadmin/compose.yaml similarity index 97% rename from postfixadmin/stack.yml rename to postfixadmin/compose.yaml index cef4054f9..2a8667ba5 100644 --- a/postfixadmin/stack.yml +++ b/postfixadmin/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: mysql:8.0 diff --git a/postfixadmin/content.md b/postfixadmin/content.md index 883d589a8..fcf1fdf93 100644 --- a/postfixadmin/content.md +++ b/postfixadmin/content.md @@ -54,6 +54,6 @@ $ docker run -v /local/path/to/config.local.php:/var/www/html/config.local.php \ %%IMAGE%% ``` -%%STACK%% +%%COMPOSE%% -Run docker stack deploy -c stack.yml %%REPO%% (or docker-compose -f stack.yml up), wait for it to initialize completely, and visit http://swarm-ip:8080, http://localhost:8080, or http://host-ip:8080 (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). diff --git a/postgres/stack.yml b/postgres/compose.yaml similarity index 86% rename from postgres/stack.yml rename to postgres/compose.yaml index 94f8c78c1..47ca8a68a 100644 --- a/postgres/stack.yml +++ b/postgres/compose.yaml @@ -1,12 +1,11 @@ # Use postgres/example user/password credentials -version: '3.9' services: db: image: postgres restart: always - # set shared memory limit when using docker-compose + # set shared memory limit when using docker compose shm_size: 128mb # or set shared memory limit when deploy via swarm stack #volumes: diff --git a/postgres/content.md b/postgres/content.md index a6bf43474..966dea20d 100644 --- a/postgres/content.md +++ b/postgres/content.md @@ -36,9 +36,9 @@ postgres=# SELECT 1; (1 row) ``` -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). # How to extend this image @@ -241,9 +241,9 @@ The three easiest ways to get around this: # Caveats -If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker-compose`, that start several containers simultaneously. +If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker compose`, that start several containers simultaneously. -Also note that the default `/dev/shm` size for containers is 64MB. If the shared memory is exhausted you will encounter `ERROR: could not resize shared memory segment . . . : No space left on device`. You will want to pass [`--shm-size=256MB`](https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources) for example to `docker run`, or alternatively in [`docker-compose`](https://docs.docker.com/compose/compose-file/05-services/#shm_size). +Also note that the default `/dev/shm` size for containers is 64MB. If the shared memory is exhausted you will encounter `ERROR: could not resize shared memory segment . . . : No space left on device`. You will want to pass [`--shm-size=256MB`](https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources) for example to `docker run`, or alternatively in [`docker compose`](https://docs.docker.com/compose/compose-file/05-services/#shm_size). ## Where to Store Data diff --git a/redmine/stack.yml b/redmine/compose.yaml similarity index 95% rename from redmine/stack.yml rename to redmine/compose.yaml index 0fc04fe7a..64ed42bb0 100644 --- a/redmine/stack.yml +++ b/redmine/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: redmine: diff --git a/redmine/content.md b/redmine/content.md index d00b5ede3..2d49551e9 100644 --- a/redmine/content.md +++ b/redmine/content.md @@ -42,9 +42,9 @@ Running Redmine with a database server is the recommended way. $ docker run -d --name some-%%REPO%% --network some-network -e REDMINE_DB_POSTGRES=some-postgres -e REDMINE_DB_USERNAME=redmine -e REDMINE_DB_PASSWORD=secret %%IMAGE%% ``` -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ## Accessing the Application diff --git a/ros/content.md b/ros/content.md index e341c2581..86033fbbf 100644 --- a/ros/content.md +++ b/ros/content.md @@ -157,13 +157,11 @@ Alternatively, more permissive network settings can be used to share all host ne ### Docker Compose -In this example we'll demonstrate using [`docker-compose`](https://docs.docker.com/compose/) to spawn a pair of message publisher and subscriber nodes in separate containers connected through shared software defined network. +In this example we'll demonstrate using [`docker compose`](https://docs.docker.com/compose/) to spawn a pair of message publisher and subscriber nodes in separate containers connected through shared software defined network. -> Create the directory `~/ros_demos` and add the first `Dockerfile` example from above. In the same directory, also create file `docker-compose.yml` with the following that runs a C++ publisher with a Python subscriber: +> Create the directory `~/ros_demos` and add the first `Dockerfile` example from above. In the same directory, also create file `compose.yaml` with the following that runs a C++ publisher with a Python subscriber: ```yaml -version: '3' - services: talker: build: ./ @@ -176,10 +174,10 @@ services: command: ros2 run demo_nodes_py listener ``` -> Use docker-compose inside the same directory to launch our ROS nodes. Given the containers created derive from the same docker compose project, they will coexist on shared project network: +> Use `docker compose` inside the same directory to launch our ROS nodes. Given the containers created derive from the same docker compose project, they will coexist on shared project network: ```console -$ docker-compose up -d +$ docker compose up -d ``` > Notice that a new network named `ros_demos_default` has been created, as can be shown further with: @@ -191,17 +189,17 @@ $ docker network inspect ros_demos_default > We can monitor the logged output of each container, such as the listener node like so: ```console -$ docker-compose logs listener +$ docker compose logs listener ``` -> Finally, we can stop and remove all the relevant containers using docker-compose from the same directory: +> Finally, we can stop and remove all the relevant containers using `docker compose` from the same directory: ```console -$ docker-compose stop -$ docker-compose rm +$ docker compose stop +$ docker compose rm ``` -> Note: the auto-generated network, `ros_demos_default`, will persist until you explicitly remove it using `docker-compose down`. +> Note: the auto-generated network, `ros_demos_default`, will persist until you explicitly remove it using `docker compose down`. ### ROS 1 Bridge @@ -223,8 +221,6 @@ CMD ["roslaunch", "roscpp_tutorials", "talker_listener_launch"] The compose file bellow spawns services for both talker listener demos while connecting the two via a dynamic bridge. You may then view the log output from both pairs of talker and listener nodes cross talking over the `/chatter` topic. ```yaml -version: '3' - services: ros1: build: diff --git a/storm/stack.yml b/storm/compose.yaml similarity index 96% rename from storm/stack.yml rename to storm/compose.yaml index a1da43b6e..e2cd56c82 100644 --- a/storm/stack.yml +++ b/storm/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: zookeeper: image: zookeeper diff --git a/storm/content.md b/storm/content.md index 1b8af1af3..345ad75bf 100644 --- a/storm/content.md +++ b/storm/content.md @@ -52,9 +52,9 @@ $ docker run -it -v $(pwd)/topology.jar:/topology.jar %%IMAGE%% storm jar /topol $ docker run -d -p 8080:8080 --restart always --name ui --link some-nimbus:nimbus %%IMAGE%% storm ui ``` -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml storm` (or `docker compose -f stack.yml up`) and wait for it to initialize completely. The Nimbus will be available at `http://swarm-ip:6627`, `http://localhost:6627`, or `http://host-ip:6627` (as appropriate). +Run `docker compose up` and wait for it to initialize completely. The Nimbus will be available at `http://localhost:6627` or `http://host-ip:6627` (as appropriate). ## Configuration diff --git a/teamspeak/stack.yml b/teamspeak/compose.yaml similarity index 97% rename from teamspeak/stack.yml rename to teamspeak/compose.yaml index 5b1287a6e..930cfdf7a 100644 --- a/teamspeak/stack.yml +++ b/teamspeak/compose.yaml @@ -1,4 +1,3 @@ -version: '3.1' services: teamspeak: image: teamspeak diff --git a/teamspeak/content.md b/teamspeak/content.md index 067b2a57f..f7b372c18 100644 --- a/teamspeak/content.md +++ b/teamspeak/content.md @@ -36,9 +36,9 @@ The TeamSpeak server log is available through Docker's container log: $ docker logs some-%%REPO%% ``` -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `swarm-ip:9987`, `localhost:9987`, or `host-ip:9987` (as appropriate) with a TeamSpeak client. +Run `docker compose up`, wait for it to initialize completely, and visit `localhost:9987` or `host-ip:9987` (as appropriate) with a TeamSpeak client. ## Environment Variables diff --git a/update.sh b/update.sh index 60ff3ad30..ce2608fe8 100755 --- a/update.sh +++ b/update.sh @@ -86,22 +86,11 @@ for image in "${images[@]}"; do logo="![logo]($logoUrl)" fi - stack= - stackYml= - stackUrl= - if [ -f "$repo/stack.yml" ]; then - stack="$(cat "$repo/stack.md" 2>/dev/null || cat "$helperDir/stack.md")" - stackYml=$'```yaml\n'"$(cat "$repo/stack.yml")"$'\n```' - stackCommit="$(git log -1 --format='format:%H' -- "$repo/stack.yml" 2>/dev/null || true)" - [ "$stackCommit" ] || stackCommit='master' - stackUrl="https://raw.githubusercontent.com/docker-library/docs/$stackCommit/$repo/stack.yml" - fi - compose= - composeYml= - if [ -f "$repo/docker-compose.yml" ]; then + composeYaml= + if [ -f "$repo/compose.yaml" ]; then compose="$(cat "$repo/compose.md" 2>/dev/null || cat "$helperDir/compose.md")" - composeYml=$'```yaml\n'"$(cat "$repo/docker-compose.yml")"$'\n```' + composeYaml=$'```yaml\n'"$(cat "$repo/compose.yaml")"$'\n```' fi deprecated= @@ -167,17 +156,10 @@ for image in "${images[@]}"; do echo " LOGO => $logo" replace_field "$targetFile" 'LOGO' "$logo" '\s*' - echo ' STACK => '"$repo"'/stack.md' - replace_field "$targetFile" 'STACK' "$stack" - echo ' STACK-YML => '"$repo"'/stack.yml' - replace_field "$targetFile" 'STACK-YML' "$stackYml" - echo ' STACK-URL => '"$repo"'/stack.yml' - replace_field "$targetFile" 'STACK-URL' "$stackUrl" - echo ' COMPOSE => '"$repo"'/compose.md' replace_field "$targetFile" 'COMPOSE' "$compose" - echo ' COMPOSE-YML => '"$repo"'/docker-compose.yml' - replace_field "$targetFile" 'COMPOSE-YML' "$composeYml" + echo ' COMPOSE-YAML => '"$repo"'/compose.yaml' + replace_field "$targetFile" 'COMPOSE-YAML' "$composeYaml" echo ' LICENSE => '"$repo"'/license.md' replace_field "$targetFile" 'LICENSE' "$license" diff --git a/wordpress/stack.yml b/wordpress/compose.yaml similarity index 100% rename from wordpress/stack.yml rename to wordpress/compose.yaml diff --git a/wordpress/content.md b/wordpress/content.md index c4e5870b4..2559aad58 100644 --- a/wordpress/content.md +++ b/wordpress/content.md @@ -47,9 +47,9 @@ $ docker run --name some-%%REPO%% -e WORDPRESS_DB_PASSWORD_FILE=/run/secrets/mys Currently, this is supported for `WORDPRESS_DB_HOST`, `WORDPRESS_DB_USER`, `WORDPRESS_DB_PASSWORD`, `WORDPRESS_DB_NAME`, `WORDPRESS_AUTH_KEY`, `WORDPRESS_SECURE_AUTH_KEY`, `WORDPRESS_LOGGED_IN_KEY`, `WORDPRESS_NONCE_KEY`, `WORDPRESS_AUTH_SALT`, `WORDPRESS_SECURE_AUTH_SALT`, `WORDPRESS_LOGGED_IN_SALT`, `WORDPRESS_NONCE_SALT`, `WORDPRESS_TABLE_PREFIX`, and `WORDPRESS_DEBUG`. -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). ## Adding additional libraries / extensions diff --git a/yourls/stack.yml b/yourls/compose.yaml similarity index 95% rename from yourls/stack.yml rename to yourls/compose.yaml index 2c467f98e..87af36411 100644 --- a/yourls/stack.yml +++ b/yourls/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: yourls: diff --git a/yourls/content.md b/yourls/content.md index 8a0b18ab1..13bec42f5 100644 --- a/yourls/content.md +++ b/yourls/content.md @@ -92,9 +92,9 @@ $ docker run --name some-%%REPO%% -e YOURLS_DB_PASS_FILE=/run/secrets/mysql-root Currently, this is supported for `YOURLS_DB_HOST`, `YOURLS_DB_USER`, `YOURLS_DB_PASS`, `YOURLS_DB_NAME`, `YOURLS_DB_PREFIX`, `YOURLS_SITE`, `YOURLS_USER`, and `YOURLS_PASS`. -## %%STACK%% +## %%COMPOSE%% -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080/admin/`, `http://localhost:8080/admin/`, or `http://:8080/admin/` (as appropriate). +Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080/admin/` or `http://:8080/admin/` (as appropriate). ## Adding additional libraries / extensions diff --git a/zookeeper/stack.yml b/zookeeper/compose.yaml similarity index 97% rename from zookeeper/stack.yml rename to zookeeper/compose.yaml index cec88f0dc..9cbbeb208 100644 --- a/zookeeper/stack.yml +++ b/zookeeper/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: zoo1: image: zookeeper diff --git a/zookeeper/content.md b/zookeeper/content.md index 67fce2454..c63bfee4b 100644 --- a/zookeeper/content.md +++ b/zookeeper/content.md @@ -28,9 +28,9 @@ $ docker run --name some-app --link some-zookeeper:zookeeper -d application-that $ docker run -it --rm --link some-zookeeper:zookeeper %%IMAGE%% zkCli.sh -server zookeeper ``` -## %%STACK%% +## %%COMPOSE%% -This will start Zookeeper in [replicated mode](https://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_RunningReplicatedZooKeeper). Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`) and wait for it to initialize completely. Ports `2181-2183` will be exposed. +This will start Zookeeper in [replicated mode](https://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_RunningReplicatedZooKeeper). Run `docker compose up` and wait for it to initialize completely. Ports `2181-2183` will be exposed. > Please be aware that setting up multiple servers on a single machine will not create any redundancy. If something were to happen which caused the machine to die, all of the zookeeper servers would be offline. Full redundancy requires that each server have its own machine. It must be a completely separate physical server. Multiple virtual machines on the same physical host are still vulnerable to the complete failure of that host.