Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iam-medvedev/vercel-ddns
Vercel Dynamic DNS
https://github.com/iam-medvedev/vercel-ddns
Last synced: 2 months ago
JSON representation
Vercel Dynamic DNS
- Host: GitHub
- URL: https://github.com/iam-medvedev/vercel-ddns
- Owner: iam-medvedev
- Created: 2021-01-17T06:45:43.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T20:18:48.000Z (7 months ago)
- Last Synced: 2024-10-15T04:12:09.833Z (3 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 15
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vercel Dynamic DNS
Simple script for exposing a local server with [Vercel DNS](https://vercel.com/docs/custom-domains).
It runs on CRON, checking the current IP address and updating DNS records for your domain.## Installation
1. Ensure that you have [jq](https://github.com/jqlang/jq) installed
2. Download `dns-sync.sh`
3. Move `dns.config.example` to `dns.config`
4. Edit the configuration variables as required
5. Open the cron settings using the command `crontab -e`
6. Add the following line to the cron job: `*/15 * * * * /path-to/vercel-ddns/dns-sync.sh`## Usage example
```sh
# Creating
➜ ./dns-sync.sh
Updating IP: x.x.x.x
Record for SUBDOMAIN does not exist. Creating...
🎉 Done!# Updating
➜ ./dns-sync.sh
Updating IP: x.x.x.x
Record for SUBDOMAIN already exists (id: rec_xxxxxxxxxxxxxxxxxxxxxxxx). Updating...
🎉 Done!
```## Docker
There is a dockerized version of `vercel-ddns` with `CRON`.
Create 3 files in your directory:
1. `Dockerfile`.
2. `start.sh` - docker entry point
3. `dns.config` - configuration for `vercel-ddns`.`Dockerfile`:
```dockerfile
FROM alpine:latestWORKDIR /root
# Installing dependencies
RUN apk --no-cache add dcron curl jq bash
SHELL ["/bin/bash", "-c"]# Cloning config and start file
COPY dns.config /root/dns.config
COPY start.sh /root/start.sh# Cloning app
RUN curl -o /root/dns-sync.sh https://raw.githubusercontent.com/iam-medvedev/vercel-ddns/master/dns-sync.sh
RUN chmod +x /root/dns-sync.sh# Setting up cron
RUN echo "*/30 * * * * /root/dns-sync.sh >> /var/log/dns-sync.log 2>&1" >> /etc/crontabs/root# Starting
CMD ["bash", "/root/start.sh"]
````start.sh`:
```sh
# Performs the first sync and starts CRON
bash /root/dns-sync.sh && crond -f
```