mirror of
https://github.com/Fishwaldo/docker-rsync.git
synced 2025-03-15 19:42:44 +00:00
docks: simple docker-compose example
This commit is contained in:
parent
a78d353f28
commit
59cc4b2408
1 changed files with 26 additions and 0 deletions
26
README.md
26
README.md
|
@ -18,3 +18,29 @@ The module path, owning user, group and allowed hosts are all configurable via e
|
||||||
```bash
|
```bash
|
||||||
$ docker run stefda/rsync -p 873:873 -e VOLUME=/my/volume -e USER=www-data -e GROUP=www-data -e ALLOW="192.168.0.0/16 10.0.0.0/16"
|
$ docker run stefda/rsync -p 873:873 -e VOLUME=/my/volume -e USER=www-data -e GROUP=www-data -e ALLOW="192.168.0.0/16 10.0.0.0/16"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Using the image with docker-compose
|
||||||
|
|
||||||
|
An example usage with docker-compose:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
rsync-volume:
|
||||||
|
image: stefda/rsync
|
||||||
|
volumes:
|
||||||
|
- /var/www/app/src
|
||||||
|
environment:
|
||||||
|
VOLUME: /var/www/app
|
||||||
|
USER: www-data
|
||||||
|
GROUP: www-data
|
||||||
|
ports:
|
||||||
|
- 10873:873
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: my-app-image
|
||||||
|
volumes_from:
|
||||||
|
- rsync-volume
|
||||||
|
```
|
||||||
|
|
||||||
|
As defined, the `web` service will have volumes from the `rsync-volume` service and so any files synced into the rsync container will be immediately available in `web` as well.
|
||||||
|
|
Loading…
Add table
Reference in a new issue