diff --git a/adminer/content.md b/adminer/content.md index 1292dc8c6..1a9eff69a 100644 --- a/adminer/content.md +++ b/adminer/content.md @@ -30,6 +30,10 @@ 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%% + +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). + ### Loading plugins This image bundles all official adminer plugins. You can find the list of plugins on GitHub: https://github.com/vrana/adminer/tree/master/plugins. diff --git a/adminer/stack.yml b/adminer/stack.yml new file mode 100644 index 000000000..98e86f5e9 --- /dev/null +++ b/adminer/stack.yml @@ -0,0 +1,15 @@ +# Use root/example as user/password credentials + +version: '3.1' + +services: + + adminer: + image: adminer + ports: + - 8080:8080 + + db: + image: mysql:5.6 + environment: + MYSQL_ROOT_PASSWORD: example diff --git a/drupal/content.md b/drupal/content.md index 1747c5b44..d56bcca23 100644 --- a/drupal/content.md +++ b/drupal/content.md @@ -81,7 +81,9 @@ $ docker run --name some-%%REPO%% --link some-postgres:postgres -d \ -v %%REPO%%-themes:/var/www/html/themes \ ``` -## %%COMPOSE%% +## %%STACK%% + +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` ## Adding additional libraries / extensions diff --git a/drupal/docker-compose.yml b/drupal/stack.yml similarity index 98% rename from drupal/docker-compose.yml rename to drupal/stack.yml index 44bb30869..5df386a26 100644 --- a/drupal/docker-compose.yml +++ b/drupal/stack.yml @@ -10,7 +10,7 @@ # Database password: example # ADVANCED OPTIONS; Database host: postgres -version: '2' +version: '3.1' services: diff --git a/elasticsearch/content.md b/elasticsearch/content.md index b2ecbdec0..62029a0be 100644 --- a/elasticsearch/content.md +++ b/elasticsearch/content.md @@ -60,3 +60,7 @@ $ docker run -d -v "$PWD/esdata":/usr/share/elasticsearch/data elasticsearch ``` This image includes `EXPOSE 9200 9300` ([default `http.port`](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-http.html)), so standard container linking will make it automatically available to the linked containers. + +## %%STACK%% + +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:5601`, `http://localhost:5601`, or `http://host-ip:5601` (as appropriate). diff --git a/elasticsearch/stack.yml b/elasticsearch/stack.yml new file mode 100644 index 000000000..1f7a01f82 --- /dev/null +++ b/elasticsearch/stack.yml @@ -0,0 +1,11 @@ +version: '3.1' + +services: + + elasticsearch: + image: elasticsearch + + kibana: + image: kibana + ports: + - 5601:5601 diff --git a/geonetwork/content.md b/geonetwork/content.md index 942767bba..7e43a1558 100644 --- a/geonetwork/content.md +++ b/geonetwork/content.md @@ -52,9 +52,9 @@ If you want the data directory to live beyond restarts, or even destruction of t $ docker run --name some-%%REPO%% -d -p 8080:8080 -e DATA_DIR=/var/lib/geonetwork_data -v /host/geonetwork-docker:/var/lib/geonetwork_data %%REPO%% ``` -## %%COMPOSE%% +## %%STACK%% -Run `docker-compose up`, wait for it to initialize completely, and visit `http://localhost:8080/geonetwork` or `http://host-ip:8080/geonetwork`. +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). ## Default credentials diff --git a/geonetwork/docker-compose.yml b/geonetwork/stack.yml similarity index 79% rename from geonetwork/docker-compose.yml rename to geonetwork/stack.yml index 6d700678e..7b29fd8db 100644 --- a/geonetwork/docker-compose.yml +++ b/geonetwork/stack.yml @@ -5,7 +5,7 @@ # Default user: admin # Default password: admin -version: '2' +version: '3.1' services: geonetwork: @@ -15,4 +15,8 @@ services: environment: DATA_DIR: /var/lib/geonetwork_data volumes: - - "/host/geonetwork-docker:/var/lib/geonetwork_data" + - geonetwork:/var/lib/geonetwork_data + +volumes: + geonetwork: + diff --git a/joomla/content.md b/joomla/content.md index fb176714d..0204ffe32 100644 --- a/joomla/content.md +++ b/joomla/content.md @@ -36,9 +36,9 @@ $ docker run --name some-%%REPO%% -e JOOMLA_DB_HOST=10.1.2.3:3306 \ -e JOOMLA_DB_USER=... -e JOOMLA_DB_PASSWORD=... -d %%REPO%% ``` -## %%COMPOSE%% +## %%STACK%% -Run `docker-compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080`. +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). ## Adding additional libraries / extensions diff --git a/joomla/docker-compose.yml b/joomla/docker-compose.yml deleted file mode 100644 index b30e54836..000000000 --- a/joomla/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -joomla: - image: joomla - links: - - joomladb:mysql - ports: - - 8080:80 - -joomladb: - image: mysql:5.6 - environment: - MYSQL_ROOT_PASSWORD: example diff --git a/joomla/stack.yml b/joomla/stack.yml new file mode 100644 index 000000000..68cb39dd4 --- /dev/null +++ b/joomla/stack.yml @@ -0,0 +1,17 @@ +version: '3.1' + +services: + joomla: + image: joomla + links: + - joomladb:mysql + ports: + - 8080:80 + environment: + JOOMLA_DB_HOST: joomladb + JOOMLA_DB_PASSWORD: example + + joomladb: + image: mysql:5.6 + environment: + MYSQL_ROOT_PASSWORD: example diff --git a/kibana/content.md b/kibana/content.md index 812f7acec..e07675bda 100644 --- a/kibana/content.md +++ b/kibana/content.md @@ -35,3 +35,7 @@ $ docker run --name some-kibana -e ELASTICSEARCH_URL=http://some-elasticsearch:9 ``` Then, access it via `http://localhost:5601` or `http://host-ip:5601` in a browser. + +## %%STACK%% + +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:5601`, `http://localhost:5601`, or `http://host-ip:5601` (as appropriate). diff --git a/kibana/stack.yml b/kibana/stack.yml new file mode 100644 index 000000000..210aba229 --- /dev/null +++ b/kibana/stack.yml @@ -0,0 +1,12 @@ +version: '3.1' + +services: + + kibana: + image: kibana + ports: + - 5601:5601 + + elasticsearch: + image: elasticsearch + diff --git a/mysql/content.md b/mysql/content.md index a5f0bca01..f1dee9740 100644 --- a/mysql/content.md +++ b/mysql/content.md @@ -44,6 +44,10 @@ $ docker run -it --rm %%REPO%% 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%% + +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). + ## Container shell access and viewing MySQL logs The `docker exec` command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your `%%REPO%%` container: diff --git a/mysql/stack.yml b/mysql/stack.yml new file mode 100644 index 000000000..c6a8b4204 --- /dev/null +++ b/mysql/stack.yml @@ -0,0 +1,15 @@ +# Use root/example as user/password credentials +version: '3.1' + +services: + + db: + image: mysql + environment: + MYSQL_ROOT_PASSWORD: example + + adminer: + image: adminer + ports: + - 8080:8080 + diff --git a/owncloud/content.md b/owncloud/content.md index b85dfa0c0..10d583238 100644 --- a/owncloud/content.md +++ b/owncloud/content.md @@ -44,4 +44,6 @@ The [`occ` tool from upstream](https://doc.owncloud.org/server/9.0/admin_manual/ $ docker exec -u www-data some-owncloud php occ status ``` -## %%COMPOSE%% +## %%STACK%% + +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). diff --git a/owncloud/docker-compose.yml b/owncloud/stack.yml similarity index 97% rename from owncloud/docker-compose.yml rename to owncloud/stack.yml index 9d827f349..2b65c429b 100644 --- a/owncloud/docker-compose.yml +++ b/owncloud/stack.yml @@ -8,7 +8,7 @@ # Database name: pick any name # Database host: replace "localhost" with "mysql" -version: '2' +version: '3.1' services: diff --git a/postgres/content.md b/postgres/content.md index 70936128a..a4491240f 100644 --- a/postgres/content.md +++ b/postgres/content.md @@ -42,6 +42,10 @@ postgres=# SELECT 1; ``` +## %%STACK%% + +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). + ## Environment Variables The PostgreSQL image uses several environment variables which are easy to miss. While none of the variables are required, they may significantly aid you in using the image. diff --git a/postgres/stack.yml b/postgres/stack.yml new file mode 100644 index 000000000..65a9cfe6e --- /dev/null +++ b/postgres/stack.yml @@ -0,0 +1,14 @@ +# Use postgres/example user/password credentials +version: '3.1' + +services: + + db: + image: postgres + environment: + POSTGRES_PASSWORD: example + + adminer: + image: adminer + ports: + - 8080:8080