Compare commits

...

5 Commits

Author SHA1 Message Date
Nico Haider e92739a299 vaultwarden: activate admin dashboard 2026-05-03 00:19:52 +02:00
Nico Haider 6a7fad7620 add mongodb 2026-05-03 00:19:28 +02:00
Nico Haider 14f16dccbd add websites 2026-05-03 00:18:48 +02:00
Nico Haider 5b92228024 affine docker 2026-04-27 17:51:32 +02:00
Nico Haider 5eca1aa0c0 deploy gastro 2026-04-26 21:51:29 +02:00
8 changed files with 217 additions and 2 deletions
+6 -1
View File
@@ -54,5 +54,10 @@ projektverwaltung/frontend
wichteln/backend
wichteln/frontend
gravcms/sportakrobatik-dobersberg
gastro/backend
gastro/frontend
websites/laserscan-haider
websites/haider
beszel/beszel_data/id_ed25519
beszel/beszel_data/
owncast/data
+3 -1
View File
@@ -8,4 +8,6 @@
- /wichteln
- /wichteln/backend -> git clone https://git.byhaider.dev/Wichteln/backend.git
- /wichteln/frontend -> git clone https://git.byhaider.dev/Wichteln/frontend.git
- /gravcms/sportakrobatik-dobersberg -> git clone https://git.byhaider.dev/gravcms/sportakrobatik-dobersberg.git
- /gravcms/sportakrobatik-dobersberg -> git clone https://git.byhaider.dev/gravcms/sportakrobatik-dobersberg.git
- /websites/laserscan-haider -> git clone git clone ssh://git@git.byhaider.dev:1103/Websites/laserscan-haider.git
- /websites/haider -> git clone git clone ssh://git@git.byhaider.dev:1103/Websites/haider.git
+84
View File
@@ -0,0 +1,84 @@
services:
affine:
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
container_name: affine_server
depends_on:
redis:
condition: service_healthy
affine_migration:
condition: service_completed_successfully
volumes:
- ${UPLOAD_LOCATION}:/root/.affine/storage
- ${CONFIG_LOCATION}:/root/.affine/config
env_file:
- .env
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgresql:5432/${DB_DATABASE:-affine}
- AFFINE_INDEXER_ENABLED=false
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-network"
- "traefik.http.routers.affine.rule=Host(`affine.byhaider.dev`)"
- "traefik.http.routers.affine.entrypoints=websecure"
- "traefik.http.routers.affine.tls=true"
- "traefik.http.routers.affine.tls.certresolver=cloudflare"
- "traefik.http.services.affine.loadbalancer.server.port=3010"
networks:
- traefik-network
- postgresql
restart: unless-stopped
affine_migration:
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
container_name: affine_migration_job
volumes:
- ${UPLOAD_LOCATION}:/root/.affine/storage
- ${CONFIG_LOCATION}:/root/.affine/config
command: ['sh', '-c', 'node ./scripts/self-host-predeploy.js']
env_file:
- .env
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgresql:5432/${DB_DATABASE:-affine}
- AFFINE_INDEXER_ENABLED=false
depends_on:
redis:
condition: service_healthy
networks:
- postgresql
redis:
image: redis
container_name: affine_redis
healthcheck:
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
interval: 10s
timeout: 5s
retries: 5
networks:
- postgresql
restart: unless-stopped
networks:
traefik-network:
external: true
postgresql:
external: true
+23
View File
@@ -0,0 +1,23 @@
# select a revision to deploy, available values: stable, beta, canary
AFFINE_REVISION=stable
# set the port for the server container it will expose the server on
PORT=3010
# set the host for the server for outgoing links
# AFFINE_SERVER_HTTPS=true
# AFFINE_SERVER_HOST=affine.yourdomain.com
# or
# AFFINE_SERVER_EXTERNAL_URL=https://affine.yourdomain.com
# position of the database data to persist
DB_DATA_LOCATION=~/.affine/self-host/postgres/pgdata
# position of the upload data(images, files, etc.) to persist
UPLOAD_LOCATION=~/.affine/self-host/storage
# position of the configuration files to persist
CONFIG_LOCATION=~/.affine/self-host/config
# database credentials
DB_USERNAME=affine
DB_PASSWORD=
DB_DATABASE=affine
+46
View File
@@ -0,0 +1,46 @@
services:
backend:
build:
context: ./backend
image: gastro-backend:latest
container_name: gastro-backend
restart: unless-stopped
environment:
DATABASE_URL: ${DATABASE_URL}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-network"
- "traefik.http.routers.gastro-backend.rule=Host(`api-gastro.byhaider.dev`)"
- "traefik.http.routers.gastro-backend.entrypoints=websecure"
- "traefik.http.routers.gastro-backend.tls=true"
- "traefik.http.routers.gastro-backend.tls.certResolver=cloudflare"
- "traefik.http.services.gastro-backend.loadbalancer.server.port=8080"
networks:
- postgresql
- traefik-network
frontend:
build:
context: ./frontend
image: gastro-frontend:latest
container_name: gastro-frontend
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.gastro-frontend.rule=Host(`gastro.byhaider.dev`)"
- "traefik.http.routers.gastro-frontend.entrypoints=websecure"
- "traefik.http.routers.gastro-frontend.tls=true"
- "traefik.http.routers.gastro-frontend.tls.certResolver=cloudflare"
- "traefik.http.services.gastro-frontend.loadbalancer.server.port=80"
networks:
- traefik-network
networks:
traefik-network:
external: true
postgresql:
external: true
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
set -e
echo "🚀 Starte Deployment für Projektverwaltung..."
cd ~/docker-setup/projektverwaltung
echo "📥 Pull latest changes for backend..."
cd backend
git pull origin main
echo "📥 Pull latest changes for frontend..."
cd ../frontend
git pull origin main
cd ..
echo "🛑 Stoppe alte Container..."
docker compose down
echo "📦 Baue Images neu..."
docker compose build
echo "⬆️ Starte Container..."
docker compose up -d
echo "🧹 Bereinige alte Images..."
docker image prune -f
echo "✅ Deployment abgeschlossen!"
docker compose ps
+22
View File
@@ -0,0 +1,22 @@
services:
mongodb:
image: mongo:7
container_name: mongodb
restart: unless-stopped
volumes:
- mongodb:/data/db
networks:
- mongodb
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
networks:
mongodb:
external: true
volumes:
mongodb:
external: true
+1
View File
@@ -7,6 +7,7 @@ services:
environment:
DOMAIN: "https://vault.byhaider.dev"
SIGNUPS_ALLOWED: "false"
ADMIN_TOKEN: ${ADMIN_TOKEN}
volumes:
- vaultwarden-data:/data