Import from Docker Compose
Copy the data of a Docker Compose file's databases and caches into Joppa's services, then switch the project over, without ever changing the source.
Does your project run PostgreSQL or Redis in its own docker-compose.yml? Joppa can copy their data into its services, then point the project at them. The source is never changed.
Where to find it
- When adding the project: the window offers Import into Joppa for each database or cache it finds. Data is copied after the project is added.
- Later: the project’s Domains tab, Docker Compose data section.
What can be imported
| Source (Compose) | Destination (Joppa) | Method |
|---|---|---|
| PostgreSQL | PostgreSQL | pg_dump then restore |
| MySQL, MariaDB | MySQL or MariaDB | mysqldump then restore |
| Redis, Valkey | Redis or Valkey | Key copy (DUMP / RESTORE) |
Joppa reads compose.yaml, compose.yml, docker-compose.yml or .yaml, the override file and COMPOSE_FILE, replacing ${VAR:-default} with the values from .env and the env_files. It finds the image version, even when the image is built from a Dockerfile (FROM).
The import plan
Before copying anything, Joppa shows the source, the destination and:
- Database to import and Name in Joppa;
- the size (or the number of keys);
- the versions on both sides;
- the extensions used by the source database: Available in Joppa, Needs enabling on the Joppa server or Not offered by Joppa.
For a cache, the Replace keys already in Joppa option chooses between merging and overwriting.
What Joppa sorts out for you
| Situation | Suggestion |
|---|---|
| The source is stopped | Start it (docker compose up), with your OK |
| No service in Joppa yet | Create PostgreSQL 17, in the same version as the source |
| The Joppa service is stopped | Start it |
| The source’s port isn’t published (caches) | The snippet to add to the Compose file |
| Extensions to enable on the server | Add them to the image and restart the service |
| A database with the same name exists | Import under another name or Replace |
The import runs in visible steps: Dump, Create database, Restore (or Reading keys, Copying keys).
Switch the project to Joppa
Once the data is copied, Switch the project to Joppa offers, as you choose:
- Stop the Compose service and free port: its data stays in Docker;
- Point the project’s .env at Joppa: the original is saved to
.env.joppa-backup.
Later leaves the Compose file and the .env as they are.