mirror of
https://github.com/timothymiller/cloudflare-ddns.git
synced 2026-03-21 22:48:57 -03:00
Added docker-compose build steps to README.md
This commit is contained in:
48
README.md
48
README.md
@@ -45,14 +45,54 @@ Alternatively, you can use the traditional API keys by setting appropriate value
|
||||
## :fax: Hosting multiple domains on the same IP?
|
||||
You can save yourself some trouble when hosting multiple domains pointing to the same IP address (in the case of Traefik) by defining one A & AAAA record 'ddns.example.com' pointing to the IP of the server that will be updated by this DDNS script. For each subdomain, create a CNAME record pointing to 'ddns.example.com'. Now you don't have to manually modify the script config every time you add a new subdomain to your site!
|
||||
|
||||
## :whale: Deploy to Docker
|
||||
## :whale: Deploy with Docker Compose
|
||||
|
||||
Create a config.json file with your production credentials and run the build-docker-image script.
|
||||
Modify the host file path of config.json inside the volumes section of docker-compose.yml.
|
||||
|
||||
```yml
|
||||
version: "3.7"
|
||||
services:
|
||||
cloudflare-ddns:
|
||||
image: timothymiller/cloudflare-ddns:latest
|
||||
container_name: cloudflare-ddns
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
volumes:
|
||||
- /EDIT/YOUR/PATH/HERE/config.json:/config.json
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
### :running: Running
|
||||
|
||||
From the project root directory
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### Building from source
|
||||
|
||||
Create a config.json file with your production credentials.
|
||||
|
||||
Give build-docker-image.sh permission to execute.
|
||||
|
||||
```bash
|
||||
sudo chmod +x ./build-docker-image.sh
|
||||
```
|
||||
|
||||
At project root, run the build-docker-image.sh script.
|
||||
|
||||
```bash
|
||||
chmod +x ./build-docker-image.sh
|
||||
./build-docker-image.sh
|
||||
docker run -d timothymiller/cloudflare_ddns:latest
|
||||
```
|
||||
|
||||
#### Run the locally compiled version
|
||||
|
||||
```bash
|
||||
docker run -d timothyjmiller/cloudflare_ddns:latest
|
||||
```
|
||||
|
||||
## :penguin: (legacy) Linux + cron instructions (all distros)
|
||||
|
||||
Reference in New Issue
Block a user