From eaa4b4445a66bfc482e45952de68d54f4a9b37ae Mon Sep 17 00:00:00 2001 From: Kevin Schley Date: Sat, 18 Nov 2023 13:42:07 +0100 Subject: [PATCH] Add docker-compose example (#114) Co-authored-by: Knut Ahlers --- .git_changerelease.yaml | 3 +++ docker-compose.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 docker-compose.yml diff --git a/.git_changerelease.yaml b/.git_changerelease.yaml index ba442d0..dae7409 100644 --- a/.git_changerelease.yaml +++ b/.git_changerelease.yaml @@ -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 ... diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b861046 --- /dev/null +++ b/docker-compose.yml @@ -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