Skip to content

Commit

Permalink
Migrate current compose examples to PWD capable stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Jun 18, 2017
1 parent 60c7d86 commit 54359bd
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 21 deletions.
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
5 changes: 3 additions & 2 deletions geonetwork/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ 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 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`.

## 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: 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

0 comments on commit 54359bd

Please sign in to comment.