Add docker-compose example (#114)

Co-authored-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Kevin Schley 2023-11-18 13:42:07 +01:00 committed by GitHub
parent 616d400f74
commit eaa4b4445a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View File

@ -18,5 +18,8 @@ pre_commit_commands:
- |-
yq -iP "(select(.spec.template.spec | has(\"containers\")) | .spec.template.spec.containers[] | select(.name == \"ots\").image) = \"luzifer/ots:v${TAG_VERSION}\"" docs/k8s_example.yml
git add docs/k8s_example.yml
- |-
yq -iP ".services.app.build.context = \"https://github.com/Luzifer/ots.git#v${TAG_VERSION}\"" docker-compose.yml
git add docker-compose.yml
...

26
docker-compose.yml Normal file
View File

@ -0,0 +1,26 @@
version: '3.8'
services:
app:
build:
context: https://github.com/Luzifer/ots.git#v1.8.0
restart: always
environment:
# Optional, see "Customization" in README
#CUSTOMIZE: '/etc/ots/customize.yaml'
# See README for details
REDIS_URL: 'redis://redis:6379/0'
# 168h = 1w
SECRET_EXPIRY: '604800'
# "mem" or "redis" (See README)
STORAGE_TYPE: 'redis'
depends_on:
- redis
ports:
- 3000:3000
redis:
image: redis:alpine
restart: always
volumes:
- ./data:/data