Docker and nginx deployment files for TikFetch.
tikfetch: Spring Boot application container.mysql: MySQL database for TikFetch.nginx: reverse proxy, media cache, and maintenance page.
cp .env.example .env
curl -L https://raw.githubusercontent.com/TikFetch/TikFetch/main/.env.docker.example -o app.env
nano .env
nano app.env
docker compose up -dThe app image and nginx/domain settings are controlled by .env.
Spring Boot settings and secrets are controlled by app.env, which is based on
TikFetch/.env.docker.example.
TIKFETCH_APP_CONTEXT points to the local TikFetch application repository. On the
production server this is usually ../app, so the infrastructure stack can build
the Spring Boot Docker image directly from the freshly pulled app source.
./scripts/maintenance-on.sh
./scripts/maintenance-off.shWhen maintenance is on, nginx serves the maintenance page at the same public URL and returns HTTP 503.
./scripts/deploy.shThe deploy script builds the TikFetch image from TIKFETCH_APP_CONTEXT, recreates the app container, and prints container status.
For nginx-only changes, run:
./scripts/deploy-nginx.shImportant
Secrets must stay in .env and app.env. Do not commit real passwords, JWT secrets, database credentials, Cloudflare tokens, or production-only values.