From 86bdd7f10da4b1be80af40ce8dc656fce2938e45 Mon Sep 17 00:00:00 2001
From: anima
Date: Tue, 13 Jun 2023 15:18:59 +0200
Subject: [PATCH] inital setup
---
.env.sample | 15 +++++++++++++++
.gitignore | 2 ++
docker-compose.yml | 29 +++++++++++++++++++++++++++++
3 files changed, 46 insertions(+)
create mode 100644 .env.sample
create mode 100644 .gitignore
create mode 100644 docker-compose.yml
diff --git a/.env.sample b/.env.sample
new file mode 100644
index 0000000..638e04d
--- /dev/null
+++ b/.env.sample
@@ -0,0 +1,15 @@
+BASEDIR=
+INTRANET=
+
+TIMETAGGER_LOG_LEVEL=info
+TIMETAGGER_BIND=0.0.0.0:80
+TIMETAGGER_DATADIR=/root/_timetagger/
+
+# create credentials: https://timetagger.app/cred
+# replace all $ with $$
+# or
+# htpasswd -bnBC 8 "" testing | sed 's/\$/\$\$/g'
+# sample: test : testing
+TIMETAGGER_CREDENTIALS=test:$$2y$$08$$9xjUvAEMxTdvaVZ9VvzCGO2V1I2h39gOvsZrT.BHJj73eghjhtYDq
+
+# hint: docker up with new credentials create a additional new user
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f020d6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.env
+files/
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..1462228
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,29 @@
+# https://docs.docker.com/compose/compose-file/compose-file-v3/
+# https://timetagger.app/articles/selfhost2/
+---
+version: "3.9"
+services:
+ timetagger:
+ image: ghcr.io/almarklein/timetagger
+ container_name: timetagger
+ env_file:
+ - .env
+ restart: unless-stopped
+ deploy:
+ replicas: 1
+ placement:
+ max_replicas_per_node: 1
+ update_config:
+ parallelism: 1
+ delay: 10s
+ ports:
+ - 80:80
+ volumes:
+ - ${BASEDIR:-.}/files/:${TIMETAGGER_DATADIR}
+# networks:
+# - backend
+
+# networks:
+# backend:
+# name: ${INTRANET:-backend}
+# external: true
\ No newline at end of file