Skip to content

Commit 8bfaf6a

Browse files
Improved docs: upgrade instructions; getting help; better alisases
1 parent 404abf1 commit 8bfaf6a

File tree

1 file changed

+41
-14
lines changed

1 file changed

+41
-14
lines changed

README.md

+41-14
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
CiviCRM buildkit on Docker is primarily built for development. It may also be useful for hosting. Contributions welcome.
44

5-
Please file specific issues on the [github issue queue](https://github.com/michaelmcandrew/civicrm-buildkit-docker/issues). More general discussion about CiviCRM and Docker should happen in CivCRM's ['cloud-native' project](https://lab.civicrm.org/dev/cloud-native).
5+
The **CiviCRM Dockerfile** ([`civicrm/Dockerfile`]('civicrm/Dockerfile')) in this repo is published on Docker hub at <https://hub.docker.com/r/michaelmcandrew/civicrm/>. It is designed to work with a MySQL compatible container. You may wish to use it with other containers like `phpmyadmin` and `maildev`.
66

7-
The CiviCRM Dockerfile ([`civicrm/Dockerfile`]('civicrm/Dockerfile')) in this repo is published on Docker hub at <https://hub.docker.com/r/michaelmcandrew/civicrm/>
8-
9-
It is designed to work with a MySQL compatible container. You may wish to use it with other containers like `phpmyadmin` and `maildev`.
10-
11-
The docker-compose.yml file in this repository is a good starting point for Docker development. Advanced users may wish to create their own `docker-compose.yml`.
7+
The **docker-compose.yml** file in this repository is a good starting point for Docker development. Advanced users may wish to create their own `docker-compose.yml`.
128

139
## Getting started
1410

@@ -56,18 +52,45 @@ Navigate to <http://localhost:8082> to view all email sent from the civicrm cont
5652

5753
Background: by default, buildkit disables outbound mail. We delete `civicrm-buildkit/app/civicrm.settings.d/100-mail.php` which re-enables outbound mail. We install `msmtp` on the `civicrm` container and configure it to deliver all mail to the `maildev` container.
5854

59-
### Command line aliases
55+
### Aliases
6056

61-
docker-compose commands get quite verbose. You may want to create aliases as follows (assuming you have downloaded this repo to `$HOME/civicrm-buildkit-docker`):
62-
63-
- `alias bk='docker-compose --file $HOME/civicrm-buildkit-docker/docker-compose.yml exec -u buildkit civicrm`
64-
- `alias bkc='docker-compose --file $HOME/civicrm-buildkit-docker/docker-compose.yml exec -u buildkit civicrm`
65-
- `alias bku='docker-compose --file $HOME/civicrm-buildkit-docker/docker-compose.yml up -d`
57+
docker-compose commands get quite verbose. You may want to create aliases as follows:
6658

59+
```bash
60+
alias bku='docker-compose --file $HOME/civicrm-buildkit-docker/docker-compose.yml up -d'
61+
alias bkc='docker-compose --file $HOME/civicrm-buildkit-docker/docker-compose.yml exec -u buildkit civicrm'
62+
alias bkb='docker-compose --file $HOME/civicrm-buildkit-docker/docker-compose.yml exec -u buildkit civicrm bash'
63+
alias bk='docker-compose --file $HOME/civicrm-buildkit-docker/docker-compose.yml'
64+
```
6765
You can then:
6866

69-
- bring up the containers with `dbu`
70-
- run build and admin tools with `dbc`, for example `dbc civibuild create dmaster`.
67+
- bring up the containers with `bku`
68+
- run build and admin tools with `bkc`, for example `bkc civibuild create dmaster`.
69+
- start bash in the civicrm container with `bkb`.
70+
- run any other docker compose command with `bk`, e.g. `bk down`
71+
72+
**Note**: the above aliases assume you have downloaded this repo to `$HOME/civicrm-buildkit-docker`. Please adjust as appropriate if you have downloaded it somewhere else.
73+
74+
75+
## Getting help
76+
77+
Feel free to ask any questions you have on the [sysadmin](https://chat.civicrm.org/civicrm/channels/sysadmin) chatroom (mentioning @michaelmcandrew if you feel like it), or file an issue in the [github issue queue](https://github.com/michaelmcandrew/civicrm-buildkit-docker/issues).
78+
79+
## Upgrading
80+
81+
New docker images are periodically released on Docker Hub at <https://hub.docker.com/r/michaelmcandrew/civicrm/>. You can upgrade to the latest version as follows:
82+
83+
1. Download the latest image with `docker pull michaelmcandrew/civicrm`.
84+
2. Run `docker-compose up -d` will rebuild your containers with the latest image.
85+
86+
**Note**: we mount `/buildkit` as a volume so that any changes you make to the civicrm container (and your bash history, etc.) persist accross restarts. This volume is mounted over the `/buildkit` directory that comes with the container. You will need to delete this volume (it gets recreated automatically based on the contents of the container) if you want to access the /buildkit directory that comes with the upgraded container. You can do that all follows:
87+
88+
From the civicrm-buildkit-docker directory:
89+
90+
1. Stop your containers `docker-compose down`.
91+
2. Identify the /buildkit volume with `docker volume ls`. It will have a 'volume name' along the lines of `civicrmbuildkitdocker_buildkit`.
92+
4. Remove the volume with `docker volume rm [VOLUME NAME]`.
93+
5. Restart the containers with `docker-compose up -d`.
7194

7295
## Architecture
7396

@@ -79,3 +102,7 @@ The `docker-compose.yml` defines the following containers:
79102
* **mysql**
80103
* **phpmyadmin** for easier MySQL admin
81104
* **maildev** to catch outbound email
105+
106+
It seems like might make sense to integrate this repository with [civicrm-buildkit](https://github.com/civicrm/civicrm-buildkit) at some point. I don't think that would be too hard to do.
107+
108+
More general discussion about CiviCRM and Docker is welcome in CivCRM's ['cloud-native' project](https://lab.civicrm.org/dev/cloud-native).

0 commit comments

Comments
 (0)