6b252598dece80baeb0e7a0ead3dd608ecc70ae2
OneDev Auto-Deployer
A production-ready Docker Compose setup for OneDev, utilizing Docker volumes for data management and Caddy for automatic SSL and reverse proxying.
Prerequisites
- Docker & Docker Compose installed.
- Ports
80,443, and6611open on your firewall. - Your domain's DNS A-Record pointing to your server's IP address.
Deployment
- Clone this repository and enter the directory.
- Run the initial setup:
chmod +x run.sh ./run.sh - The script will create a
.envfile. Edit this file and set yourDOMAINandEMAIL. - Run
./run.shagain to start the services.
SSL & HTTP Configuration
This deployment handles routing automatically via Caddy:
- Auto SSL (Let's Encrypt): If you provide an
EMAILin the.envfile, Caddy will automatically fetch and renew an SSL certificate. - Custom SSL: If you place
cert.pemandkey.peminside thecerts/folder, Caddy will use those instead. - Plain HTTP: If you leave
EMAILcompletely blank in the.envfile and provide no custom certificates, Caddy will serve the site over plain HTTP on port 80.
Custom SSL Certificates (Optional)
By default, the script will automatically obtain a Let's Encrypt certificate for your domain.
If you want to use your own certificates:
- Place your certificate and key inside the
certs/folder. - Rename them to exactly
cert.pemandkey.pem. - Run
./run.sh. The script will detect them and use them instead of Let's Encrypt.
Managing Data
Data is stored securely in Docker managed volumes. To back up your OneDev data, you need to back up the onedev_data docker volume.
Description
Languages
Shell
100%