Every Waddle project is a Git repository holding the website’s code and the complete recipe for its servers, from PHP and Nginx versions down to compile options and extensions. Share that repository, and a colleague builds exactly the same setup you have, with no “works on my machine” surprises.
Your colleague doesn’t even need Waddle, since the project runs on plain Docker too. Waddle just makes it a lot easier, and this walkthrough assumes they have it. If they don’t, see Running a Project Without Waddle instead.
There are three things that travel separately:
- The project itself, through a Git host such as GitHub, GitLab, Bitbucket, or whatever server you prefer.
- The secrets, meaning database passwords, application keys and salts, and the website’s
own config file (for example
wp-config.phpfor WordPress). Waddle keeps all of these out of Git and exports them as one block of text, optionally encrypted with a passphrase. - The database, as an SQL file.
This walkthrough has two halves. The first is done by you, the person who has the project. The second is done by your colleague, the person receiving it.
Your part
Push the project to a Git host
Create a new, empty, private repository on your Git host. Then open a terminal in the project directory. The terminal icon on the project’s row has a Project directory option that does exactly that. Connect the project to the new repository and push it:
$ git remote add origin git@github.com:you/myblog.git
$ git push -u origin HEAD
Replace the URL with your own repository’s. If you have edited files in the project, commit them first so they go along. Changes you make in Waddle’s project settings are committed for you automatically, unless you have turned off Auto-commit config changes under System → Settings.
Export the secrets
Click the paintbrush icon on the project’s row to open the project settings, and stay on the General tab. Under Shared secrets, click Export secrets.
You can set a passphrase to encrypt the export. It’s optional, but a good idea if you send the export over chat or email.
Click Export, then Copy to clipboard.
Send the copied block to your colleague privately, and send the passphrase through a different channel than the block itself.
The export holds what every developer on the project needs to run it. It deliberately leaves out things that are personal to you, such as your passwords for remote servers.
Export the database
If your project has a database, click the database icon
on the project’s row and choose Export database. Pick a folder and click the export button. Waddle writes the database to an .sql file there, named after the
database. Send that file to your colleague as well, privately, since it holds your site’s
content and user accounts.
Your colleague’s part
Make sure Git can reach the repository
Waddle clones without stopping to ask for a password, so your colleague’s access needs to work on its own:
- SSH URLs (
git@github.com:...) need an SSH key the Git host knows about, loaded into the SSH agent. - HTTPS URLs need a Git credential helper, or an access token in the URL.
A quick test is cloning the repository once in a terminal. If that works without a prompt, Waddle will work too.
Clone the project
With Waddle installed, click Clone at the top of the project list, next to New. (The same action lives in the title bar menu under Projects → Clone project and opens the same dialog on any view.) Fill in the form:
- Repository. The repository’s URL. A folder already on disk works too, using the folder icon to pick it.
- Directory name. The folder name for the project under
~/.waddle/projects/. - Title. The name shown in the project list. Waddle suggests one from the directory name.
- Secrets blob. Paste the block you received.
- Passphrase. Only if the block was encrypted.
- SQL dump file. The database file you received. Waddle imports it during the first build.
Click Clone & Build. Waddle clones the repository, restores the secrets, and builds the project exactly like a new one. The first build might take a while, since every service is compiled from source (unless you already had the same images from earlier similar projects).
Waddle may tell you that template tracking was reset. That happens when the project was set up with a different copy of Waddle’s templates than your colleague has, and it’s harmless. Click Continue and wait for the build to finish like any other build.
Staying in sync
From here on, you share changes the usual Git way, with git push and git pull.
- Code and configuration changes come through Git. After pulling changes that touch the project settings, build the project so they take effect. The build overview shows what changed.
- Database changes don’t travel through Git. Export the database again and have your colleague use Import database from the database icon . If they use a different local domain for the project than you do, they should check Sync DB next to it, so the site’s URLs are updated after the import.
Domain Handling on Deploy covers how Waddle keeps URLs correct when a database moves between environments.