Komoot GPX backup
  • PHP 86.5%
  • Twig 5%
  • JavaScript 4.2%
  • CSS 3.6%
  • Dockerfile 0.7%
Find a file
2026-09-21 22:22:19 +02:00
assets Add German and English translations 2026-09-18 23:54:07 +02:00
bin Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
config Prepare production deployment 2026-09-19 00:35:34 +02:00
migrations Persist Komoot tour metadata 2026-09-15 15:54:17 +02:00
public Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
src Prepare production deployment 2026-09-19 00:35:34 +02:00
templates Prepare production deployment 2026-09-19 00:35:34 +02:00
tests Prepare production deployment 2026-09-19 00:35:34 +02:00
translations Add German and English translations 2026-09-18 23:54:07 +02:00
.dockerignore Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
.editorconfig Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
.env Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
.env.dev Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
.env.prod.example Use independent production application stack 2026-09-21 22:22:19 +02:00
.env.test Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
.gitignore Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
AGENTS.md Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
Caddyfile Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
CLAUDE.md Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
compose.prod.yaml Use independent production application stack 2026-09-21 22:22:19 +02:00
compose.yaml Share SQLite database with host 2026-09-15 18:39:09 +02:00
composer.json Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
composer.lock Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
Dockerfile Use independent production application stack 2026-09-21 22:22:19 +02:00
Dockerfile.caddy Use independent production application stack 2026-09-21 22:22:19 +02:00
importmap.php Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
phpstan.neon Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
phpunit.dist.xml Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
README.md Use independent production application stack 2026-09-21 22:22:19 +02:00
specs.md Use independent production application stack 2026-09-21 22:22:19 +02:00
symfony.lock Initialize Symfony workspace with PHPStan and Komoot client 2026-09-15 10:55:49 +02:00
TEST_COMMIT.txt Test elevated Git commit access 2026-09-15 11:03:15 +02:00

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.