You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+41-14
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,9 @@
2
2
3
3
CiviCRM buildkit on Docker is primarily built for development. It may also be useful for hosting. Contributions welcome.
4
4
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`.
6
6
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`.
12
8
13
9
## Getting started
14
10
@@ -56,18 +52,45 @@ Navigate to <http://localhost:8082> to view all email sent from the civicrm cont
56
52
57
53
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.
58
54
59
-
### Command line aliases
55
+
### Aliases
60
56
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`):
-`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:
66
58
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
+
```
67
65
You can then:
68
66
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`.
71
94
72
95
## Architecture
73
96
@@ -79,3 +102,7 @@ The `docker-compose.yml` defines the following containers:
79
102
***mysql**
80
103
***phpmyadmin** for easier MySQL admin
81
104
***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