Added an example directory with docker-compose
This commit is contained in:
parent
d9206a7ef2
commit
176faffccd
@ -1,5 +0,0 @@
|
|||||||
services:
|
|
||||||
docker-cron-git-pull:
|
|
||||||
image: testing
|
|
||||||
volumes:
|
|
||||||
- ./logs:/logs
|
|
12
example/README.md
Normal file
12
example/README.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Simple example
|
||||||
|
|
||||||
|
This demonstrates the basic functionality of the git-puller image.
|
||||||
|
|
||||||
|
|
||||||
|
## How to get this working
|
||||||
|
|
||||||
|
First, build the image. Therefore, see section Building in the projects root README.md.
|
||||||
|
|
||||||
|
Second, our git-puller needs some git repository to keep up-to-date. So just clone any git repository into the to-pull folder and see what happens when you run it.
|
||||||
|
|
||||||
|
How to run it? Just use `docker compose up -d` in this folder!
|
10
example/docker-compose.yaml
Normal file
10
example/docker-compose.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
services:
|
||||||
|
git-puller:
|
||||||
|
image: git-puller
|
||||||
|
volumes:
|
||||||
|
- ./to-pull:/to-pull
|
||||||
|
environment:
|
||||||
|
PULL_LOCATION: "/to-pull" # the folder with the git repo to pull
|
||||||
|
PULL_INTERVAL: 10 # time in seconds between pulls (minimum is 5)
|
||||||
|
GIT_OUTPUT: "0" # if this is 0, the git command's stdout will not be shown in 'docker logs'
|
||||||
|
PULLER_UID: "1000" # the uid of the user that executes the 'git pull' command in the container (if set to 0, root will do it!)
|
Loading…
Reference in New Issue
Block a user