Skip to content

Commit 13887ca

Browse files
author
michaelhodges
committed
Refactor evironment variables.
Edit compose files to match template. (volumes, enviroment, restart ect..)
1 parent 0d3470a commit 13887ca

104 files changed

Lines changed: 514 additions & 280 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

services/actual-budget/.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_tim
2020
# PUID=1000
2121

2222
#EXAMPLE_VAR="Environment varibale"
23+
24+
# Uncomment any of the lines below to set configuration options.
25+
#ACTUAL_HTTPS_KEY=/data/selfhost.key
26+
#ACTUAL_HTTPS_CERT=/data/selfhost.crt
27+
ACTUAL_PORT=5006
28+
ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=20
29+
ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=50
30+
ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=20
31+
# See all options and more details at https://actualbudget.org/docs/config/

services/actual-budget/compose.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,12 @@ services:
5656
- PUID=1000
5757
- PGID=1000
5858
- TZ=${TZ}
59-
# Uncomment any of the lines below to set configuration options.
60-
# - ACTUAL_HTTPS_KEY=/data/selfhost.key
61-
# - ACTUAL_HTTPS_CERT=/data/selfhost.crt
62-
# - ACTUAL_PORT=5006
63-
# - ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=20
64-
# - ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=50
65-
# - ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=20
66-
# See all options and more details at https://actualbudget.org/docs/config/
67-
# !! If you are not using any of these options, remove the 'environment:' tag entirely.
59+
- ACTUAL_HTTPS_KEY=${ACTUAL_HTTPS_KEY}
60+
- ACTUAL_HTTPS_CERT=${ACTUAL_HTTPS_CERT}
61+
- ACTUAL_PORT=${ACTUAL_PORT}
62+
- ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=${ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB}
63+
- ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=${ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB}
64+
- ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=${ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB}
6865
volumes:
6966
- ./${SERVICE}-data:/data
7067
depends_on:

services/adguardhome-sync/.env

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,27 @@ TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_tim
2020
# PUID=1000
2121

2222
#EXAMPLE_VAR="Environment varibale"
23+
24+
# Origin AdGuardHome
25+
ORIGIN_URL=http://192.168.1.1:3000 #Your origin Adguard Home instance -> change as necessary
26+
ORIGIN_USERNAME=username #change as necessary
27+
ORIGIN_PASSWORD=password #change as necessary
28+
29+
# First replication target
30+
REPLICA1_URL=http://192.168.1.2 #Your destination Adguard Home instance change as necessary
31+
REPLICA1_USERNAME=dbtech #change as necessary
32+
REPLICA1_PASSWORD=password #change as necessary
33+
34+
# Second replication target (optional)
35+
#REPLICA2_URL=http://192.168.1.3 #change as necessary
36+
#REPLICA2_USERNAME=username #change as necessary
37+
#REPLICA2_PASSWORD=password #change as necessary
38+
39+
# Third replication target (optional)
40+
#REPLICA3_URL=http://192.168.1.4 #change as necessary
41+
#REPLICA3_USERNAME=username #change as necessary
42+
#REPLICA3_PASSWORD=password #change as necessary
43+
44+
# Options
45+
CRON=*/1 * * * * # run every 1 minute
46+
RUN_ON_START=true

services/adguardhome-sync/compose.yaml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,20 @@ services:
4343
command: run
4444
environment:
4545
- TZ=${TZ}
46-
# Origin AdGuardHome
47-
- ORIGIN_URL=http://192.168.1.1:3000 #Your origin Adguard Home instance -> change as necessary
48-
- ORIGIN_USERNAME=username #change as necessary
49-
- ORIGIN_PASSWORD=password #change as necessary
50-
51-
# First replication target
52-
- REPLICA1_URL=http://192.168.1.2 #Your destination Adguard Home instance change as necessary
53-
- REPLICA1_USERNAME=dbtech #change as necessary
54-
- REPLICA1_PASSWORD=password #change as necessary
55-
56-
# Second replication target (optional)
57-
#- REPLICA2_URL=http://192.168.1.3 #change as necessary
58-
#- REPLICA2_USERNAME=username #change as necessary
59-
#- REPLICA2_PASSWORD=password #change as necessary
60-
61-
# Third replication target (optional)
62-
#- REPLICA3_URL=http://192.168.1.4 #change as necessary
63-
#- REPLICA3_USERNAME=username #change as necessary
64-
#- REPLICA3_PASSWORD=password #change as necessary
65-
66-
# Options
67-
- CRON=*/1 * * * * # run every 1 minute
68-
- RUN_ON_START=true
46+
- ORIGIN_URL=${ORIGIN_URL}
47+
- ORIGIN_USERNAME=${ORIGIN_USERNAME}
48+
- ORIGIN_PASSWORD=${ORIGIN_PASSWORD}
49+
- REPLICA1_URL=${REPLICA1_URL}
50+
- REPLICA1_USERNAME=${REPLICA1_USERNAME}
51+
- REPLICA1_PASSWORD=${REPLICA1_PASSWORD}
52+
- REPLICA2_URL=${REPLICA2_URL}
53+
- REPLICA2_USERNAME=${REPLICA2_USERNAME}
54+
- REPLICA2_PASSWORD=${REPLICA2_PASSWORD}
55+
- REPLICA3_URL=${REPLICA3_URL}
56+
- REPLICA3_USERNAME=${REPLICA3_USERNAME}
57+
- REPLICA3_PASSWORD=${REPLICA3_PASSWORD}
58+
- CRON=${CRON}
59+
- RUN_ON_START=${RUN_ON_START}
6960
depends_on:
7061
tailscale:
7162
condition: service_healthy

services/affine/.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ AFFINE_REVISION=stable
2828
AFFINE_SERVER_EXTERNAL_URL=https://affine.<YOUR_TS_DOMAIN>.ts.net
2929

3030
# database credentials
31-
DB_USERNAME=affine
32-
DB_PASSWORD=affine
33-
DB_DATABASE=affine
31+
POSTGRES_USER=affine
32+
POSTGRES_PASSWORD=affine
33+
DB_DATABASE=affine

services/affine/compose.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ services:
6161
condition: service_completed_successfully
6262
volumes:
6363
# custom configurations
64-
- ./${SERVICE}-storage:/root/.affine/storage
65-
- ./${SERVICE}-config:/root/.affine/config
64+
- ./${SERVICE}-data/storage:/root/.affine/storage
65+
- ./${SERVICE}-data/config:/root/.affine/config
6666
env_file:
6767
- .env
6868
environment:
6969
# Varibles are delared in .env file.
7070
- REDIS_SERVER_HOST=redis
71-
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${postgres:-affine}
71+
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${postgres:-affine}
7272
- AFFINE_INDEXER_ENABLED=false
7373
#- EXAMPLE_VAR=${EXAMPLE_VAR}
7474
restart: always
@@ -78,15 +78,15 @@ services:
7878
container_name: affine_migration_job # Name for local container management
7979
volumes:
8080
# custom configurations
81-
- ./${SERVICE}-storage:/root/.affine/storage
82-
- ./${SERVICE}-config:/root/.affine/config
81+
- ./${SERVICE}-data/storage:/root/.affine/storage
82+
- ./${SERVICE}-data/config:/root/.affine/config
8383
command: [ 'sh', '-c', 'node ./scripts/self-host-predeploy.js' ]
8484
env_file:
8585
- .env
8686
environment:
8787
# Varibles are delared in .env file.
8888
- REDIS_SERVER_HOST=redis
89-
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${postgres:-affine}
89+
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${postgres:-affine}
9090
- AFFINE_INDEXER_ENABLED=false
9191
#- EXAMPLE_VAR=${EXAMPLE_VAR}
9292
depends_on:
@@ -109,16 +109,16 @@ services:
109109
image: pgvector/pgvector:pg16 # Image to be used
110110
container_name: affine_postgres # Name for local container management
111111
volumes:
112-
- ./postgres:/var/lib/postgresql/data
112+
- ./${SERVICE}-data/postgres:/var/lib/postgresql/data
113113
environment:
114114
# Varibles are delared in .env file.
115-
POSTGRES_USER: ${DB_USERNAME}
116-
POSTGRES_PASSWORD: ${DB_PASSWORD}
117-
POSTGRES_DB: ${postgres:-affine}
118-
POSTGRES_INITDB_ARGS: '--data-checksums'
115+
- POSTGRES_USER=${POSTGRES_USER}
116+
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
117+
- POSTGRES_DB=${postgres:-affine}
118+
- POSTGRES_INITDB_ARGS='--data-checksums'
119119
# you better set a password for you database
120120
# or you may add 'POSTGRES_HOST_AUTH_METHOD=trust' to ignore postgres security policy
121-
POSTGRES_HOST_AUTH_METHOD: trust
121+
- POSTGRES_HOST_AUTH_METHOD=trust
122122
#- EXAMPLE_VAR=${EXAMPLE_VAR}
123123
healthcheck:
124124
test: [ 'CMD', 'pg_isready', '-U', "${DB_USERNAME}", '-d', "${postgres:-affine}" ] # Check if postgres process is running

services/arcane/.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@ TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_tim
2020
TAILNET_NAME= # for example: tail-scale
2121

2222
#EXAMPLE_VAR="Environment varibale"
23+
24+
#ENCRYPTION_KEY must be 32 bytes (raw/base64/hex). Use 'openssl rand -base64 32' in your CLI to generate a secure random key.
25+
ENCRYPTION_KEY=verysecretkeythatshouldbereplaced
26+
#JWT_SECRET should be a secure random string. Use 'openssl rand -base64 32' in your CLI to generate another secure random key.
27+
JWT_SECRET=verysecretkeythatshouldbereplaced
28+
LOG_LEVEL=info # Optional
29+
LOG_JSON=false # Optional
30+
OIDC_ENABLED=false # Optional

services/arcane/compose.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ services:
5656
- APP_URL=https://arcane.${TAILNET_NAME}.ts.net
5757
- PUID=1000
5858
- PGID=1000
59-
- ENCRYPTION_KEY=verysecretkeythatshouldbereplaced # ENCRYPTION_KEY must be 32 bytes (raw/base64/hex). Use 'openssl rand -base64 32' in your CLI to generate a secure random key.
60-
- JWT_SECRET=verysecretkeythatshouldbereplaced # JWT_SECRET should be a secure random string. Use 'openssl rand -base64 32' in your CLI to generate another secure random key.
61-
- LOG_LEVEL=info # Optional
62-
- LOG_JSON=false # Optional
63-
- OIDC_ENABLED=false # Optional
59+
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
60+
- JWT_SECRET=${JWT_SECRET}
61+
- LOG_LEVEL=${LOG_LEVEL}
62+
- LOG_JSON=${LOG_JSON}
63+
- OIDC_ENABLED=${OIDC_ENABLED}
6464
volumes:
6565
- /var/run/docker.sock:/var/run/docker.sock
6666
- ./${SERVICE}-data:/app/data
67-
- ./opt/dockerdata:/app/data/projects # Optional volume for an existing Docker Compose directory.
67+
- ./${SERVICE}-data/opt/dockerdata:/app/data/projects # Optional volume for an existing Docker Compose directory.
6868
depends_on:
6969
tailscale:
7070
condition: service_healthy

services/beszel-agent/.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_tim
2020
# PUID=1000
2121

2222
#EXAMPLE_VAR="Environment varibale"
23+
24+
PORT=45876
25+
KEY: "ssh-ed25519 <ADD-YOUR-beszel-agent-KEY-HERE>"
26+

services/beszel-agent/compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ services:
3939
network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale
4040
container_name: app-${SERVICE} # Name for local container management
4141
environment:
42-
PORT: 45876
43-
KEY: "ssh-ed25519 <ADD-YOUR-beszel-agent-KEY-HERE>"
42+
- PORT=${PORT}
43+
- KEY=${KEY}
4444
volumes:
4545
- /var/run/docker.sock:/var/run/docker.sock:ro # Read-only access to the docker.sock
4646
depends_on:

0 commit comments

Comments
 (0)