|
@@ -22,29 +22,29 @@ $ docker run --name some-%%REPO%% -p 8080:80 -d %%IMAGE%%
|
|
|
|
|
|
Then, access it via `http://localhost:8080` or `http://host-ip:8080` in a browser.
|
|
Then, access it via `http://localhost:8080` or `http://host-ip:8080` in a browser.
|
|
|
|
|
|
-There are multiple database types supported by this image, most easily used via standard container linking. In the default configuration, SQLite can be used to avoid a second container and write to flat-files. More detailed instructions for different (more production-ready) database types follow.
|
|
|
|
|
|
+There are multiple database types supported by this image, most easily used via Docker networks. In the default configuration, SQLite can be used to avoid a second container and write to flat-files. More detailed instructions for different (more production-ready) database types follow.
|
|
|
|
|
|
When first accessing the webserver provided by this image, it will go through a brief setup process. The details provided below are specifically for the "Set up database" step of that configuration process.
|
|
When first accessing the webserver provided by this image, it will go through a brief setup process. The details provided below are specifically for the "Set up database" step of that configuration process.
|
|
|
|
|
|
## MySQL
|
|
## MySQL
|
|
|
|
|
|
```console
|
|
```console
|
|
-$ docker run --name some-%%REPO%% --link some-mysql:mysql -d %%IMAGE%%
|
|
|
|
|
|
+$ docker run --name some-%%REPO%% --network some-network -d %%IMAGE%%
|
|
```
|
|
```
|
|
|
|
|
|
- Database type: `MySQL, MariaDB, or equivalent`
|
|
- Database type: `MySQL, MariaDB, or equivalent`
|
|
- Database name/username/password: `<details for accessing your MySQL instance>` (`MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_DATABASE`; see environment variables in the description for [`mysql`](https://hub.docker.com/_/mysql/))
|
|
- Database name/username/password: `<details for accessing your MySQL instance>` (`MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_DATABASE`; see environment variables in the description for [`mysql`](https://hub.docker.com/_/mysql/))
|
|
-- ADVANCED OPTIONS; Database host: `mysql` (for using the `/etc/hosts` entry added by `--link` to access the linked container's MySQL instance)
|
|
|
|
|
|
+- ADVANCED OPTIONS; Database host: `some-mysql` (for using the DNS entry added by `--network` to access the MySQL container)
|
|
|
|
|
|
## PostgreSQL
|
|
## PostgreSQL
|
|
|
|
|
|
```console
|
|
```console
|
|
-$ docker run --name some-%%REPO%% --link some-postgres:postgres -d %%IMAGE%%
|
|
|
|
|
|
+$ docker run --name some-%%REPO%% --network some-network -d %%IMAGE%%
|
|
```
|
|
```
|
|
|
|
|
|
- Database type: `PostgreSQL`
|
|
- Database type: `PostgreSQL`
|
|
- Database name/username/password: `<details for accessing your PostgreSQL instance>` (`POSTGRES_USER`, `POSTGRES_PASSWORD`; see environment variables in the description for [`postgres`](https://hub.docker.com/_/postgres/))
|
|
- Database name/username/password: `<details for accessing your PostgreSQL instance>` (`POSTGRES_USER`, `POSTGRES_PASSWORD`; see environment variables in the description for [`postgres`](https://hub.docker.com/_/postgres/))
|
|
-- ADVANCED OPTIONS; Database host: `postgres` (for using the `/etc/hosts` entry added by `--link` to access the linked container's PostgreSQL instance)
|
|
|
|
|
|
+- ADVANCED OPTIONS; Database host: `some-postgres` (for using the DNS entry added by `--network` to access the PostgreSQL container)
|
|
|
|
|
|
## Volumes
|
|
## Volumes
|
|
|
|
|
|
@@ -61,7 +61,7 @@ $ docker run --rm %%IMAGE%% tar -cC /var/www/html/sites . | tar -xC /path/on/hos
|
|
This can then be bind-mounted into a new container:
|
|
This can then be bind-mounted into a new container:
|
|
|
|
|
|
```console
|
|
```console
|
|
-$ docker run --name some-%%REPO%% --link some-postgres:postgres -d \
|
|
|
|
|
|
+$ docker run --name some-%%REPO%% --network some-network -d \
|
|
-v /path/on/host/modules:/var/www/html/modules \
|
|
-v /path/on/host/modules:/var/www/html/modules \
|
|
-v /path/on/host/profiles:/var/www/html/profiles \
|
|
-v /path/on/host/profiles:/var/www/html/profiles \
|
|
-v /path/on/host/sites:/var/www/html/sites \
|
|
-v /path/on/host/sites:/var/www/html/sites \
|
|
@@ -74,7 +74,7 @@ Another solution using Docker Volumes:
|
|
```console
|
|
```console
|
|
$ docker volume create %%REPO%%-sites
|
|
$ docker volume create %%REPO%%-sites
|
|
$ docker run --rm -v %%REPO%%-sites:/temporary/sites %%IMAGE%% cp -aRT /var/www/html/sites /temporary/sites
|
|
$ docker run --rm -v %%REPO%%-sites:/temporary/sites %%IMAGE%% cp -aRT /var/www/html/sites /temporary/sites
|
|
-$ docker run --name some-%%REPO%% --link some-postgres:postgres -d \
|
|
|
|
|
|
+$ docker run --name some-%%REPO%% --network some-network -d \
|
|
-v %%REPO%%-modules:/var/www/html/modules \
|
|
-v %%REPO%%-modules:/var/www/html/modules \
|
|
-v %%REPO%%-profiles:/var/www/html/profiles \
|
|
-v %%REPO%%-profiles:/var/www/html/profiles \
|
|
-v %%REPO%%-sites:/var/www/html/sites \
|
|
-v %%REPO%%-sites:/var/www/html/sites \
|