Skip to content

Commit e950136

Browse files
committed
Updated readme and removed unused config file
1 parent 3240b09 commit e950136

File tree

2 files changed

+49
-291
lines changed

2 files changed

+49
-291
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,58 @@ and modified to build Subversion as well as Apache.
55

66
## Usage
77

8+
To quickly get a Subversion server up and running with a test repository and a single user, run:
9+
10+
```
11+
docker run -d -p 80:80 -e SVN_REPO_NAME=test -e SVN_USER=admin -e SVN_PASSWORD=securepassword httpd-svn
12+
```
13+
14+
That creates a Subversion repository named test and exposes it to the user admin with password securepassword on port 80 without SSL.
15+
For a slightly more realistic configuration run:
16+
17+
```
18+
docker run -d --mount source=v_svn,target=/svn -p 443:443 -e HTTPD_SSL=on \
19+
-e HTTPD_SERVER_NAME=myhost.mydomain.com -e SVN_REPO_NAME=test \
20+
-e SVN_USER=admin -e SVN_PASSWORD=securepassword httpd-svn
21+
```
22+
23+
That uses SSL with a self-signed certificate and the host name myhost.mydomain.com. It also uses a volume for the
24+
Subversion repositories, configuration files and backup files.
25+
26+
For production use without a fronting load balancer:
27+
28+
```
29+
docker run -d --name httpd-svn --mount source=v_svn,target=/svn \
30+
--mount type=bind,source="$(pwd)/server.crt",target=/usr/local/apache2/conf/server.crt,readonly \
31+
--mount type=bind,source="$(pwd)/server.key",target=/usr/local/apache2/conf/server.key,readonly \
32+
-p 443:443 -e HTTPD_SSL=on \
33+
-e HTTPD_SERVER_NAME=myhost.mydomain.com httpd-svn
34+
```
35+
36+
This uses a real SSL certificate mapped into the container and a volume for the repositories, configuration files and backups.
37+
Users are added manually:
38+
```
39+
docker exec -it httpd-svn /bin/bash
40+
htpasswd -B /svn/config/svn-users someuser
41+
```
42+
Access rights are also defined manually, see /svn/config/svn-access. Repositories should be owned by httpd:
43+
```
44+
docker exec -it httpd-svn /bin/bash
45+
svnadmin create /svn/repos/somerepo
46+
chown -R httpd:httpd /svn/repos/somerepo
47+
```
48+
49+
Backups can be created using the backup-svn-repos.sh script using an external cron job:
50+
```
51+
docker exec httpd-svn backup-svn-repos.sh
52+
```
53+
54+
The backups are saved in the same volume as the repositories, so be sure to copy the files to another location as well.
55+
856

957
## Notes
1058

1159
* It is important to set the ServerName option to the real external host name, as Subversion (or rather DAV) needs it for the copy command.
1260
Set HTTPD_SERVER_NAME when using the default configuration or be sure to set it manually. If not defined the container's host name will
1361
be used and that is probably wrong.
14-
* It is a very good idea to require SSL/TLS or alternatively to use a web front with SSL. The default configuration assumes a web front.
62+
* It is a very good idea to require SSL/TLS or alternatively to use a web front with SSL.

httpd-conf/httpd-ssl.conf

Lines changed: 0 additions & 290 deletions
This file was deleted.

0 commit comments

Comments
 (0)