1
0

Removed memos, added affine and renamed files

This commit is contained in:
Adrien Bouvais 2025-06-10 22:46:12 +00:00
parent 11572fd2b7
commit 896173a8a9
8 changed files with 100 additions and 20 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ cache
letsencrypt
website-pro
config/gitea/conf
config/affine/private.key

View File

@ -1,16 +1,16 @@
services:
memos:
image: neosmemo/memos:stable
container_name: memos
restart: unless-stopped
volumes:
- "./hdd0/memos:/var/opt/memos"
labels:
- "traefik.enable=true"
- "traefik.http.routers.memos.rule=Host(`notes.bouvais.lu`)"
- "traefik.http.routers.memos.entrypoints=websecure"
- "traefik.http.routers.memos.tls.certresolver=myresolver"
- "traefik.http.services.memos.loadbalancer.server.port=5230"
#memos:
# image: neosmemo/memos:stable
# container_name: memos
# restart: unless-stopped
# volumes:
# - "./hdd0/memos:/var/opt/memos"
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.memos.rule=Host(`notes.bouvais.lu`)"
# - "traefik.http.routers.memos.entrypoints=websecure"
# - "traefik.http.routers.memos.tls.certresolver=myresolver"
# - "traefik.http.services.memos.loadbalancer.server.port=5230"
jellyfin:
image: jellyfin/jellyfin
@ -87,3 +87,47 @@ services:
- "traefik.http.routers.vaultwarden-admin.tls.certresolver=myresolver"
- "traefik.http.routers.vaultwarden-admin.middlewares=auth@docker"
- "traefik.http.routers.vaultwarden-admin.service=my-vaultwarden-service@docker"
affine:
image: ghcr.io/toeverything/affine-graphql:stable
container_name: affine
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
affine_migration:
condition: service_completed_successfully
volumes:
- /home/adrien/Web-stack/hdd0/affine/storage:/root/.affine/storage
- /home/adrien/Web-stack/config/affine:/root/.affine/config
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/affine
- AFFINE_INDEXER_ENABLED=false
- AFFINE_SERVER_EXTERNAL_URL=https://affine.bouvais.lu
labels:
- "traefik.enable=true"
- "traefik.http.routers.affine.rule=Host(`affine.bouvais.lu`)"
- "traefik.http.routers.affine.entrypoints=websecure"
- "traefik.http.routers.affine.tls.certresolver=myresolver"
- "traefik.http.services.affine.loadbalancer.server.port=3010"
affine_migration:
image: ghcr.io/toeverything/affine-graphql:stable
container_name: affine_migration
volumes:
# custom configurations
- /home/adrien/Web-stack/hdd0/affine/storage:/root/.affine/storage
- /home/adrien/Web-stack/config/affine:/root/.affine/config
command: ['sh', '-c', 'node ./scripts/self-host-predeploy.js']
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/affine
- AFFINE_INDEXER_ENABLED=false
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy

View File

@ -24,3 +24,7 @@ scrape_configs:
- job_name: 'gitea' # For host system metrics
static_configs:
- targets: ['gitea:3000']
- job_name: 'affine'
static_configs:
- targets: ['affine:3010']

29
databases.yml Normal file
View File

@ -0,0 +1,29 @@
services:
redis:
image: redis
container_name: redis
healthcheck:
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
postgres:
image: pgvector/pgvector:pg16
container_name: postgres
volumes:
- /home/adrien/Web-stack/hdd0/postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: affine
POSTGRES_INITDB_ARGS: '--data-checksums'
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test:
['CMD', 'pg_isready', '-U', "${DB_USERNAME}", '-d', "affine"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped

View File

@ -1,7 +1,8 @@
include:
- compose-apps.yml
- compose-gitea.yml
- compose-monitoring.yml
- databases.yml
- apps.yml
- gitea.yml
- monitoring.yml
services:
traefik:

View File

@ -24,11 +24,12 @@ services:
gitea-runner:
image: docker.io/gitea/act_runner:latest
container_name: gitea-runner
restart: unless-stopped
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: https://git.bouvais.lu/
GITEA_RUNNER_REGISTRATION_TOKEN: m03Cj8wJjujfRXenMoN0pVy1J34GmuwbZZ9Bghs1
GITEA_RUNNER_REGISTRATION_TOKEN: jBEK4cLzDp2wqv1Ru3SHyzC0xzl1FV94IcsGe5kd
volumes:
- ./config/gitea-runner/config.yaml:/config.yaml
- ./hdd0/gitea-runner:/data

View File

@ -7,13 +7,13 @@ services:
restart: unless-stopped
volumes:
- ./config/prometheus:/etc/prometheus
- ./hdd0/prometheus:/prometheus # For Prometheus data persistence
- ./hdd0/prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.enable-lifecycle' # Allows hot-reloading of config via API
- '--web.enable-lifecycle'
labels:
- "traefik.enable=true"
- "traefik.http.routers.prometheus.rule=Host(`prometheus.bouvais.lu`)"
@ -37,14 +37,14 @@ services:
environment:
- GF_SECURITY_ADMIN_USER=adrien
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_MY_PASSWORD}
- GF_SERVER_ROOT_URL=https://grafana.bouvais.lu # Set this for correct links if behind a subpath
- GF_SERVER_ROOT_URL=https://grafana.bouvais.lu
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.bouvais.lu`)"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls.certresolver=myresolver"
- "traefik.http.routers.grafana.service=grafana"
- "traefik.http.services.grafana.loadbalancer.server.port=3000" # Grafana's default port
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
- "traefik.http.routers.grafana.middlewares=auth@docker"
depends_on:
- prometheus