Skip to content

Migrate current compose examples to PWD capable stacks #941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions adminer/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 15 additions & 0 deletions adminer/stack.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion drupal/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion drupal/docker-compose.yml → drupal/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Database password: example
# ADVANCED OPTIONS; Database host: postgres

version: '2'
version: '3.1'

services:

Expand Down
4 changes: 4 additions & 0 deletions elasticsearch/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
11 changes: 11 additions & 0 deletions elasticsearch/stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.1'

services:

elasticsearch:
image: elasticsearch

kibana:
image: kibana
ports:
- 5601:5601
4 changes: 2 additions & 2 deletions geonetwork/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions geonetwork/docker-compose.yml → geonetwork/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Default user: admin
# Default password: admin

version: '2'
version: '3.1'
services:

geonetwork:
Expand All @@ -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:

4 changes: 2 additions & 2 deletions joomla/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 0 additions & 11 deletions joomla/docker-compose.yml

This file was deleted.

17 changes: 17 additions & 0 deletions joomla/stack.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions kibana/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
12 changes: 12 additions & 0 deletions kibana/stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.1'

services:

kibana:
image: kibana
ports:
- 5601:5601

elasticsearch:
image: elasticsearch

4 changes: 4 additions & 0 deletions mysql/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 15 additions & 0 deletions mysql/stack.yml
Original file line number Diff line number Diff line change
@@ -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

4 changes: 3 additions & 1 deletion owncloud/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion owncloud/docker-compose.yml → owncloud/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Database name: pick any name
# Database host: replace "localhost" with "mysql"

version: '2'
version: '3.1'

services:

Expand Down
4 changes: 4 additions & 0 deletions postgres/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions postgres/stack.yml
Original file line number Diff line number Diff line change
@@ -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