From 01278b6eac6836e77a52b9d4fdadad0436d2fce0 Mon Sep 17 00:00:00 2001 From: drajabr <70832668+drajabr@users.noreply.github.com> Date: Sun, 11 Feb 2024 09:09:05 +0700 Subject: [PATCH 1/6] Update docker-compose.yml with added proxy auth variables Usually, if someone is using docker for other than local testing will be using a reverse proxy to access applications, and most of the time also for authentication. So added the required environment variables to work with proxy auth. --- deploy/docker-compose.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index f1d41fc7..a277a976 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -14,9 +14,22 @@ services: ports: - "80:80" volumes: - - ./_timetagger:/root/_timetagger + - timetagger:/root/_timetagger environment: - TIMETAGGER_BIND=0.0.0.0:80 - TIMETAGGER_DATADIR=/root/_timetagger - TIMETAGGER_LOG_LEVEL=info - - TIMETAGGER_CREDENTIALS=test:$$2a$$08$$0CD1NFiIbancwWsu3se1v.RNR/b7YeZd71yg3cZ/3whGlyU6Iny5i # test:test + + # The default local auth test:test, comment this line if not used "i.e in production" + - TIMETAGGER_CREDENTIALS=test:$$2a$$08$$0CD1NFiIbancwWsu3se1v.RNR/b7YeZd71yg3cZ/3whGlyU6Iny5i + + # Using the reverse proxy authintication + # I use cosmos-cloud.io, change corrosponding headers and ip for the proxy + # Uncomment the following 3 lines if not using proxy to auth + - TIMETAGGER_PROXY_AUTH_ENABLED=true + - TIMETAGGER_PROXY_AUTH_TRUSTED=100.0.0.0/8 + - TIMETAGGER_PROXY_AUTH_HEADER='X-cosmos-user' + +volumes: + timetagger: + driver: local From 236dedca83f98979bdd6c859d2ac8a097042691e Mon Sep 17 00:00:00 2001 From: drajabr <70832668+drajabr@users.noreply.github.com> Date: Sun, 11 Feb 2024 09:20:42 +0700 Subject: [PATCH 2/6] Update docker-compose.nonroot.yml with added proxy auth variables Added proxy auth variables and changed the default port. --- deploy/docker-compose.nonroot.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/deploy/docker-compose.nonroot.yml b/deploy/docker-compose.nonroot.yml index 75ec1a40..26e2a43b 100644 --- a/deploy/docker-compose.nonroot.yml +++ b/deploy/docker-compose.nonroot.yml @@ -8,15 +8,29 @@ # !! If you use a .env file, use single quotes instead of escaping !! version: "3" + +volumes: + timetagger: + driver: local + services: timetagger: - image: ghcr.io/almarklein/timetagger:v23.9.2-nonroot + image: ghcr.io/almarklein/timetagger:v23.11.4-nonroot ports: - - "80:80" + - "8888:80" volumes: - - ./_timetagger:/opt/_timetagger + - timetagger:/root/_timetagger environment: - TIMETAGGER_BIND=0.0.0.0:80 - - TIMETAGGER_DATADIR=/opt/_timetagger + - TIMETAGGER_DATADIR=/root/_timetagger - TIMETAGGER_LOG_LEVEL=info - - TIMETAGGER_CREDENTIALS=test:$$2a$$08$$0CD1NFiIbancwWsu3se1v.RNR/b7YeZd71yg3cZ/3whGlyU6Iny5i # test:test + + # The default local auth test:test, comment this line if not used "i.e in production" + - TIMETAGGER_CREDENTIALS=test:$$2a$$08$$0CD1NFiIbancwWsu3se1v.RNR/b7YeZd71yg3cZ/3whGlyU6Iny5i + + # Using the reverse proxy authintication + # I use cosmos-cloud.io, change corrosponding headers and ip for the proxy + # Uncomment the following 3 lines if not using proxy to auth + - TIMETAGGER_PROXY_AUTH_ENABLED=true + - TIMETAGGER_PROXY_AUTH_TRUSTED=100.0.0.0/8 + - TIMETAGGER_PROXY_AUTH_HEADER='X-cosmos-user' From eb4feb75b8f74827204bdb1aa371ec04a455141f Mon Sep 17 00:00:00 2001 From: drajabr <70832668+drajabr@users.noreply.github.com> Date: Sun, 11 Feb 2024 09:22:23 +0700 Subject: [PATCH 3/6] Update docker-compose.yml Edit: default docker forwarding port not to colloid with the proxy --- deploy/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index a277a976..66f07210 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -12,7 +12,7 @@ services: timetagger: image: ghcr.io/almarklein/timetagger ports: - - "80:80" + - "8888:80" volumes: - timetagger:/root/_timetagger environment: From 7e9df66d329d1aa15dc2e5caa87ec67b918f70f7 Mon Sep 17 00:00:00 2001 From: drajabr <70832668+drajabr@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:21:36 +0700 Subject: [PATCH 4/6] Update deploy/docker-compose.nonroot.yml Co-authored-by: Almar Klein --- deploy/docker-compose.nonroot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/docker-compose.nonroot.yml b/deploy/docker-compose.nonroot.yml index 26e2a43b..fa786250 100644 --- a/deploy/docker-compose.nonroot.yml +++ b/deploy/docker-compose.nonroot.yml @@ -31,6 +31,6 @@ services: # Using the reverse proxy authintication # I use cosmos-cloud.io, change corrosponding headers and ip for the proxy # Uncomment the following 3 lines if not using proxy to auth - - TIMETAGGER_PROXY_AUTH_ENABLED=true - - TIMETAGGER_PROXY_AUTH_TRUSTED=100.0.0.0/8 - - TIMETAGGER_PROXY_AUTH_HEADER='X-cosmos-user' + # - TIMETAGGER_PROXY_AUTH_ENABLED=true + # - TIMETAGGER_PROXY_AUTH_TRUSTED=100.0.0.0/8 + # - TIMETAGGER_PROXY_AUTH_HEADER='X-cosmos-user' From 9aa96bc0357f29057b2b21ab15f5f5a9cbcf7efe Mon Sep 17 00:00:00 2001 From: drajabr <70832668+drajabr@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:21:44 +0700 Subject: [PATCH 5/6] Update deploy/docker-compose.nonroot.yml Co-authored-by: Almar Klein --- deploy/docker-compose.nonroot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker-compose.nonroot.yml b/deploy/docker-compose.nonroot.yml index fa786250..7b167abe 100644 --- a/deploy/docker-compose.nonroot.yml +++ b/deploy/docker-compose.nonroot.yml @@ -28,7 +28,7 @@ services: # The default local auth test:test, comment this line if not used "i.e in production" - TIMETAGGER_CREDENTIALS=test:$$2a$$08$$0CD1NFiIbancwWsu3se1v.RNR/b7YeZd71yg3cZ/3whGlyU6Iny5i - # Using the reverse proxy authintication + # Using the reverse proxy authentication # I use cosmos-cloud.io, change corrosponding headers and ip for the proxy # Uncomment the following 3 lines if not using proxy to auth # - TIMETAGGER_PROXY_AUTH_ENABLED=true From 93f6a1ff28ebf590fd898d9c53b0152746bd85f0 Mon Sep 17 00:00:00 2001 From: drajabr <70832668+drajabr@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:21:50 +0700 Subject: [PATCH 6/6] Update deploy/docker-compose.nonroot.yml Co-authored-by: Almar Klein --- deploy/docker-compose.nonroot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker-compose.nonroot.yml b/deploy/docker-compose.nonroot.yml index 7b167abe..c47c1941 100644 --- a/deploy/docker-compose.nonroot.yml +++ b/deploy/docker-compose.nonroot.yml @@ -29,7 +29,7 @@ services: - TIMETAGGER_CREDENTIALS=test:$$2a$$08$$0CD1NFiIbancwWsu3se1v.RNR/b7YeZd71yg3cZ/3whGlyU6Iny5i # Using the reverse proxy authentication - # I use cosmos-cloud.io, change corrosponding headers and ip for the proxy + # This uses cosmos-cloud.io, change corresponding headers and ip for the proxy # Uncomment the following 3 lines if not using proxy to auth # - TIMETAGGER_PROXY_AUTH_ENABLED=true # - TIMETAGGER_PROXY_AUTH_TRUSTED=100.0.0.0/8