forked from docker/comanage-registry-docker
Permalink
comanage-registry-docker/docs/volumes-and-data-persistence.md
Newer
100644
66 lines (49 sloc)
2.44 KB
1
<!--
2
COmanage Registry Docker documentation
3
4
Portions licensed to the University Corporation for Advanced Internet
5
Development, Inc. ("UCAID") under one or more contributor license agreements.
6
See the NOTICE file distributed with this work for additional information
7
regarding copyright ownership.
8
9
UCAID licenses this file to you under the Apache License, Version 2.0
10
(the "License"); you may not use this file except in compliance with the
11
License. You may obtain a copy of the License at:
12
13
http://www.apache.org/licenses/LICENSE-2.0
14
15
Unless required by applicable law or agreed to in writing, software
16
distributed under the License is distributed on an "AS IS" BASIS,
17
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
See the License for the specific language governing permissions and
19
limitations under the License.
20
-->
21
22
# COmanage Registry Volumes and Data Persistence
23
24
COmanage Registry requires a relational database. See other documentation in
25
this repository for examples of how to orchestrate a COmanage Registry container
26
together with an container providing a relational database service, and for details on how
27
to configure the COmanage Registry container to connect to the database.
28
29
Additionally COmanage Registry *requires* a persistent directory into which
30
a few files and a specific directory structure needed by COmanage Registry
31
will be written.
32
33
*The persistent directory must be provided either using a Docker volume
34
or a bind mount.*
35
36
The directory path inside the container that must be mounted
38
39
For example to use a bind mount from the local Docker engine host:
40
41
```
42
sudo mkdir -p /opt/comanage-registry-local
43
```
44
45
and then when instantiating the container
46
47
```
48
docker run -d \
49
--name comanage-registry \
50
-v /opt/comanage-registry-local:/srv/comanage-registry/local \
51
-p 80:80 \
52
-p 443:443 \
53
comanage-registry:3.3.3-shibboleth-sp-1
54
```
55
56
After the image is instantiated into a container for the first time
57
the entrypoint script will create the necessary directory structure
58
along with the `database.php`, `email.php`, and other necessary configuration files using
59
database, email server, and other details found in
60
[environment variables](./comanage-registry-common-environment-variables.md).
61
62
*After the first instantiation of the container later restarts will not overwrite
63
database, email, or any other details in the persistent directory, even if the
64
values for the environment variables change*.
65
66