fix: use env_file for all server config

- Move ARTDAG_DOMAIN, ARTDAG_USER, ARTDAG_L1, JWT_SECRET to .env
- Update docker-stack.yml L1 config to use env_file
- Add .env.example with all required variables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-07 19:31:02 +00:00
parent 0edea7b91b
commit 8159627651
3 changed files with 21 additions and 6 deletions

13
.env.example Normal file
View File

@@ -0,0 +1,13 @@
# L2 Server Configuration
# Domain for this ActivityPub server
ARTDAG_DOMAIN=artdag.rose-ash.com
# Default username (for actor endpoints)
ARTDAG_USER=giles
# L1 server URL (for fetching run data)
ARTDAG_L1=https://l1.artdag.rose-ash.com
# JWT secret for token signing (generate with: openssl rand -hex 32)
JWT_SECRET=your-secret-here-generate-with-openssl-rand-hex-32

View File

@@ -6,10 +6,8 @@ services:
env_file: env_file:
- .env - .env
environment: environment:
- ARTDAG_DOMAIN=artdag.rose-ash.com
- ARTDAG_USER=giles
- ARTDAG_DATA=/data/l2 - ARTDAG_DATA=/data/l2
- ARTDAG_L1=http://celery_l1-server:8100 # ARTDAG_DOMAIN, ARTDAG_USER, ARTDAG_L1, JWT_SECRET from .env file
volumes: volumes:
- l2_data:/data/l2 - l2_data:/data/l2
networks: networks:

View File

@@ -24,9 +24,12 @@ services:
image: git.rose-ash.com/art-dag/l1-server:latest image: git.rose-ash.com/art-dag/l1-server:latest
ports: ports:
- "8100:8100" - "8100:8100"
env_file:
- .env
environment: environment:
- REDIS_URL=redis://redis:6379/5 - REDIS_URL=redis://redis:6379/5
- CACHE_DIR=/data/cache - CACHE_DIR=/data/cache
# L2_SERVER and L2_DOMAIN from .env file
volumes: volumes:
- l1_cache:/data/cache - l1_cache:/data/cache
depends_on: depends_on:
@@ -45,6 +48,7 @@ services:
environment: environment:
- REDIS_URL=redis://redis:6379/5 - REDIS_URL=redis://redis:6379/5
- CACHE_DIR=/data/cache - CACHE_DIR=/data/cache
- C_FORCE_ROOT=true
volumes: volumes:
- l1_cache:/data/cache - l1_cache:/data/cache
depends_on: depends_on:
@@ -61,11 +65,11 @@ services:
image: git.rose-ash.com/art-dag/l2-server:latest image: git.rose-ash.com/art-dag/l2-server:latest
ports: ports:
- "8200:8200" - "8200:8200"
env_file:
- .env
environment: environment:
- ARTDAG_DOMAIN=artdag.rose-ash.com
- ARTDAG_USER=giles
- ARTDAG_DATA=/data/l2 - ARTDAG_DATA=/data/l2
- ARTDAG_L1=http://l1-server:8100 # ARTDAG_DOMAIN, ARTDAG_USER, ARTDAG_L1, JWT_SECRET from .env file
volumes: volumes:
- l2_data:/data/l2 - l2_data:/data/l2
depends_on: depends_on: