Skip to content

Commit 94ff477

Browse files
committed
Add an example compose.yaml file
In many cases when hosting the application with Docker, Docker Compose is being used. As such a compose.yaml is written. To make this job easier a default compose.yaml is being created that can easily be changed to fit the needs.
1 parent 2a9ed49 commit 94ff477

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ migration aborts container startup.
3838

3939
For configuring the application look at the section [Environment Variables](#environment-variables).
4040

41+
----
42+
43+
To run the application using [Docker Compose](https://docs.docker.com/compose/)
44+
the [`compose.yaml`](compose.yaml) file can be used as a base template. The
45+
application manages it's own SQLite database and Apache webserver. As such no
46+
external services are needed.
47+
4148
### Running directly on a PHP server
4249

4350
KittyShare can also be hosted directly on a server with PHP 8.4 or later. Apache is supported out of the box, although other web servers such as Nginx or Caddy can also be used.

‎compose.yaml‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# KittyShare demo Compose file.
2+
#
3+
# Copy this file to your server, adjust the paths and settings below,
4+
# then start the application with:
5+
#
6+
# docker compose up -d
7+
#
8+
# The web interface will be available on http://localhost:9000 by default.
9+
10+
services:
11+
kittyshare:
12+
# Image pulled from the GitHub Container Registry. Tags can either be
13+
# `latest`, the full commit SHA, or a release version (e.g. `v1.2.0`).
14+
image: ghcr.io/quickwrite/kittyshare:latest
15+
restart: unless-stopped
16+
ports:
17+
- 9000:80
18+
volumes:
19+
# Host folder that gets shared (read-only). Change the folder to the
20+
# folder you want to share.
21+
- /my/public/folder:/data/files:ro
22+
# Named volume that persists the SQLite database across restarts.
23+
- db_data:/var/www/data
24+
# environment:
25+
# Session lifetime in seconds (default: 2592000 = 30 days).
26+
# - KITTYSHARE_SESSION_LIFETIME=2592000
27+
#
28+
# Session cookie SameSite policy: Lax, Strict or None (default: Lax).
29+
# None requires Secure (see below).
30+
# - KITTYSHARE_COOKIE_SAMESITE=Lax
31+
#
32+
# Session cookie Secure flag: 1/true/yes/on or 0/false/no/off.
33+
# When left unset (default), it follows automatically whether the
34+
# request uses HTTPS. Set to true when using SameSite=None.
35+
# - KITTYSHARE_COOKIE_SECURE=true
36+
#
37+
# List dotfiles in share and picker listings: true to show
38+
# (default: false = hidden).
39+
# - KITTYSHARE_SHOW_DOTFILES=false
40+
#
41+
# Canonical base URL used when generating absolute share links
42+
# (default: relative links). Accepts three formats:
43+
# full URL, host + path without protocol, or bare path.
44+
# - KITTYSHARE_BASE_URL=https://files.example.com
45+
# - KITTYSHARE_BASE_URL=127.0.0.1:9000/app
46+
# - KITTYSHARE_BASE_URL=/app
47+
#
48+
# Generic meta description text (default: omitted).
49+
# When set, it is used for <meta name="description"> and
50+
# og:description on all pages.
51+
# - KITTYSHARE_META_DESCRIPTION=KittyShare: self-hosted private file sharing.
52+
#
53+
# Open Graph tags: none, minimal or per-share (default: none).
54+
# `none`: no og:* tags.
55+
# `minimal`: only generic site tags (og:site_name, og:type, og:title).
56+
# `per-share`: additionally the shared folder/file name as og:title,
57+
# file/folder counts as og:description, and the app logo as
58+
# og:image on share pages.
59+
#
60+
# - KITTYSHARE_META_OG_MODE=none
61+
62+
volumes:
63+
# Persists the SQLite database file outside the container lifecycle.
64+
db_data:

0 commit comments

Comments
 (0)