debloat + disk size VM
This commit is contained in:
parent
5fd446bc2f
commit
5852ba9925
6 changed files with 3 additions and 188 deletions
|
|
@ -1,80 +0,0 @@
|
||||||
name: affine
|
|
||||||
services:
|
|
||||||
affine:
|
|
||||||
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
|
|
||||||
container_name: affine_server
|
|
||||||
ports:
|
|
||||||
- '${PORT:-3010}:3010'
|
|
||||||
depends_on:
|
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
postgres:
|
|
||||||
condition: service_healthy
|
|
||||||
affine_migration:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
volumes:
|
|
||||||
# custom configurations
|
|
||||||
- ${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}@postgres:5432/${DB_DATABASE:-affine}
|
|
||||||
- AFFINE_INDEXER_ENABLED=false
|
|
||||||
restart: unless-stopped
|
|
||||||
labels:
|
|
||||||
tsdproxy.enable: "true"
|
|
||||||
tsdproxy.name: "affine"
|
|
||||||
|
|
||||||
affine_migration:
|
|
||||||
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
|
|
||||||
container_name: affine_migration_job
|
|
||||||
volumes:
|
|
||||||
# custom configurations
|
|
||||||
- ${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}@postgres:5432/${DB_DATABASE:-affine}
|
|
||||||
- AFFINE_INDEXER_ENABLED=false
|
|
||||||
depends_on:
|
|
||||||
postgres:
|
|
||||||
condition: service_healthy
|
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis
|
|
||||||
container_name: affine_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: affine_postgres
|
|
||||||
volumes:
|
|
||||||
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: ${DB_USERNAME}
|
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
||||||
POSTGRES_DB: ${DB_DATABASE:-affine}
|
|
||||||
POSTGRES_INITDB_ARGS: '--data-checksums'
|
|
||||||
# you better set a password for you database
|
|
||||||
# or you may add 'POSTGRES_HOST_AUTH_METHOD=trust' to ignore postgres security policy
|
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
||||||
healthcheck:
|
|
||||||
test:
|
|
||||||
['CMD', 'pg_isready', '-U', "${DB_USERNAME}", '-d', "${DB_DATABASE:-affine}"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
# Usage:
|
|
||||||
# mkdir -p ~/archivebox/data && cd ~/archivebox
|
|
||||||
# curl -fsSL 'https://docker-compose.archivebox.io' > docker-compose.yml
|
|
||||||
# docker compose run archivebox version
|
|
||||||
# docker compose run archivebox config --set SAVE_ARCHIVE_DOT_ORG=False
|
|
||||||
# docker compose run archivebox add --depth=1 'https://news.ycombinator.com'
|
|
||||||
# docker compose run -T archivebox add < bookmarks.txt
|
|
||||||
# docker compose up -d && open 'https://localhost:8000'
|
|
||||||
# docker compose run archivebox help
|
|
||||||
# Documentation:
|
|
||||||
# https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose
|
|
||||||
|
|
||||||
services:
|
|
||||||
archivebox:
|
|
||||||
image: archivebox/archivebox:latest
|
|
||||||
ports:
|
|
||||||
- 8647:8000
|
|
||||||
volumes:
|
|
||||||
- ./data:/data
|
|
||||||
# ./data/personas/Default/chrome_profile/Default:/data/personas/Default/chrome_profile/Default
|
|
||||||
environment:
|
|
||||||
- ALLOWED_HOSTS=* # set this to the hostname(s) you're going to serve the site from!
|
|
||||||
- CSRF_TRUSTED_ORIGINS=https://archive.rufous-trench.ts.net # you MUST set this to the server's URL for admin login and the REST API to work
|
|
||||||
- PUBLIC_INDEX=True # set to False to prevent anonymous users from viewing snapshot list
|
|
||||||
- PUBLIC_SNAPSHOTS=True # set to False to prevent anonymous users from viewing snapshot content
|
|
||||||
- PUBLIC_ADD_VIEW=False # set to True to allow anonymous users to submit new URLs to archive
|
|
||||||
# ...
|
|
||||||
# For more info, see: https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#configuration
|
|
||||||
labels:
|
|
||||||
tsdproxy.enable: "true"
|
|
||||||
tsdproxy.name: "archive"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
services:
|
|
||||||
broker:
|
|
||||||
image: docker.io/library/redis:8
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- redisdata:/data
|
|
||||||
webserver:
|
|
||||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
- broker
|
|
||||||
ports:
|
|
||||||
- "8061:8000"
|
|
||||||
volumes:
|
|
||||||
- ./data:/usr/src/paperless/data
|
|
||||||
- /home/criz/Medias/PaperlessNGX:/usr/src/paperless/media
|
|
||||||
- ./export:/usr/src/paperless/export
|
|
||||||
- ./consume:/usr/src/paperless/consume
|
|
||||||
env_file: docker-compose.env
|
|
||||||
environment:
|
|
||||||
PAPERLESS_REDIS: redis://broker:6379
|
|
||||||
labels:
|
|
||||||
tsdproxy.enable: "true"
|
|
||||||
tsdproxy.name: "paper"
|
|
||||||
volumes:
|
|
||||||
data:
|
|
||||||
media:
|
|
||||||
redisdata:
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
services:
|
|
||||||
qbittorrent:
|
|
||||||
image: lscr.io/linuxserver/qbittorrent:latest
|
|
||||||
container_name: qbittorrentHDD
|
|
||||||
environment:
|
|
||||||
- PUID=1000
|
|
||||||
- PGID=1000
|
|
||||||
- TZ=Etc/UTC
|
|
||||||
- WEBUI_PORT=13462
|
|
||||||
- TORRENTING_PORT=6882
|
|
||||||
volumes:
|
|
||||||
- ./config:/config
|
|
||||||
- /mnt/moviesHDD/torrents:/downloads #optional
|
|
||||||
ports:
|
|
||||||
- 13462:13462
|
|
||||||
- 6882:6882
|
|
||||||
- 6882:6882/udp
|
|
||||||
restart: unless-stopped
|
|
||||||
labels:
|
|
||||||
tsdproxy.enable: "true"
|
|
||||||
tsdproxy.name: "torrentHDD"
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
services:
|
|
||||||
qbittorrent:
|
|
||||||
image: lscr.io/linuxserver/qbittorrent:latest
|
|
||||||
container_name: qbittorrentSSD
|
|
||||||
environment:
|
|
||||||
- PUID=1000
|
|
||||||
- PGID=1000
|
|
||||||
- TZ=Etc/UTC
|
|
||||||
- WEBUI_PORT=13461
|
|
||||||
- TORRENTING_PORT=6881
|
|
||||||
volumes:
|
|
||||||
- ./config:/config
|
|
||||||
- /home/criz/Medias/Torrents:/downloads #optional
|
|
||||||
ports:
|
|
||||||
- 13461:13461
|
|
||||||
- 6881:6881
|
|
||||||
- 6881:6881/udp
|
|
||||||
restart: unless-stopped
|
|
||||||
labels:
|
|
||||||
tsdproxy.enable: "true"
|
|
||||||
tsdproxy.name: "torrentSSD"
|
|
||||||
|
|
@ -7,6 +7,7 @@ set -euo pipefail
|
||||||
VM_NAME="forgejo-runner-vm"
|
VM_NAME="forgejo-runner-vm"
|
||||||
IMAGE="images:debian/trixie"
|
IMAGE="images:debian/trixie"
|
||||||
MEMORY="2GiB"
|
MEMORY="2GiB"
|
||||||
|
DISK="25GiB"
|
||||||
CPUS="4"
|
CPUS="4"
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|
@ -30,7 +31,8 @@ else
|
||||||
incus launch "$IMAGE" "$VM_NAME" \
|
incus launch "$IMAGE" "$VM_NAME" \
|
||||||
--vm \
|
--vm \
|
||||||
-c limits.memory="$MEMORY" \
|
-c limits.memory="$MEMORY" \
|
||||||
-c limits.cpu="$CPUS"
|
-c limits.cpu="$CPUS" \
|
||||||
|
--device root,size="$DISK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue