- PHP 86.5%
- Twig 5%
- JavaScript 4.2%
- CSS 3.6%
- Dockerfile 0.7%
| assets | ||
| bin | ||
| config | ||
| migrations | ||
| public | ||
| src | ||
| templates | ||
| tests | ||
| translations | ||
| .dockerignore | ||
| .editorconfig | ||
| .env | ||
| .env.dev | ||
| .env.prod.example | ||
| .env.test | ||
| .gitignore | ||
| AGENTS.md | ||
| Caddyfile | ||
| CLAUDE.md | ||
| compose.prod.yaml | ||
| compose.yaml | ||
| composer.json | ||
| composer.lock | ||
| Dockerfile | ||
| Dockerfile.caddy | ||
| importmap.php | ||
| phpstan.neon | ||
| phpunit.dist.xml | ||
| README.md | ||
| specs.md | ||
| symfony.lock | ||
| TEST_COMMIT.txt | ||
Komoot GPX backup
This project uses Symfony 8.1, PHP 8.4, Caddy, and SQLite. The application container runs PHP-FPM; Caddy serves public/ and forwards PHP requests to it.
Start
docker compose up --build
Open http://localhost:8080 and use the Komoot credentials page.
CLI
Run Symfony commands in the PHP container:
docker compose exec -u www-data php php bin/console about
docker compose exec -u www-data php php bin/console list
The SQLite database is created when the first connection opens it and is stored as var/data_dev.db in the host-mounted var/ directory. Run Symfony commands as www-data so SQLite files remain writable by PHP-FPM. Once migrations exist, run:
docker compose exec -u www-data php php bin/console doctrine:migrations:migrate --no-interaction
Production deployment
The production overlay is intended to run behind an existing HTTPS Caddy proxy. The application has its own PHP-FPM and Caddy containers, but neither container publishes a host port. The application Caddy container joins an external Docker network so the central proxy can reach it by container name.
On the server, create the persistent directories and production environment file:
mkdir -p var
cp .env.prod.example .env.prod.local
chmod 600 .env.prod.local
Set a unique random APP_SECRET, the public DEFAULT_URI, and the SQLite DATABASE_URL in .env.prod.local. The database file will be var/data_prod.db on the host.
Create the external network used by the central Caddy proxy if it does not exist yet:
docker network create proxy
Build and start the production overlay:
docker compose -f compose.yaml -f compose.prod.yaml build
docker compose -f compose.yaml -f compose.prod.yaml up -d
docker compose -f compose.yaml -f compose.prod.yaml exec -u www-data php php bin/console doctrine:migrations:migrate --no-interaction --env=prod
docker compose -f compose.yaml -f compose.prod.yaml exec -u www-data php php bin/console cache:clear --env=prod
Back up var/data_prod.db. Do not include session files, cache files, or logs in ordinary backups because a session can temporarily contain Komoot credentials. The production Compose file uses production Composer dependencies, immutable application images, secure session cookies, and a persistent var/ directory.
Configure the central Caddy proxy to use the application container on the shared network:
komoot.example.org {
reverse_proxy komoot-caddy:80
}
If the central proxy uses a different Docker network name, change the external network name in compose.prod.yaml. The central Caddy container must join that same external network.