Move resources to env file.

This commit is contained in:
2025-10-30 07:29:20 -07:00
parent 945039bd8a
commit 05374bf501
2 changed files with 49 additions and 39 deletions

View File

@@ -26,46 +26,11 @@ services:
environment:
- USER_UID=1000
- USER_GID=1000
#networks:
# - gitea
- CPU=$CPU
- MEM=$MEM
deploy:
mode: global
resources:
limits:
# Minimum requirements for processes to start properly.
# Takes a while to start up and migrate projects, but does work.
###cpus: '0.05'
###memory: 64M
# Production-quality performance.
###cpus: '0.10'
###memory: 128M
# Extra! Idles around 120M but exceeds 170M sometimes after busy.
###cpus: '0.25'
###memory: 192M
# Final thoughts after tests.
cpus: '0.50'
memory: 192M
## Test Results ##
# 0.05 CPU, 64MB RAM
# - Migrate https://github.com/hyperling/ansible
# - Page: 10512ms Template: 2111ms
# - Migrate https://github.com/hyperling/website
# - Page: 6514ms Template: 807ms
# - Migrate https://github.com/hyperling/docker
# - Page: 8105ms Template: 1201ms
# 0.10 CPU, 128MB RAM
# - Migrate https://github.com/hyperling/ansible
# - Page: 2501ms Template: 294ms
# - Migrate https://github.com/hyperling/website
# - Page: 786ms Template: 194ms
# - Migrate https://github.com/hyperling/docker
# - Page: 1283ms Template: 87ms
# 0.25 CPU, 192MB RAM
# - Migrate https://github.com/hyperling/ansible
# - Page: 439ms Template: 101ms
# - Migrate https://github.com/hyperling/website
# - Page: 541ms Template: 2ms
# - Migrate https://github.com/hyperling/docker
# - Page: 254ms Template: 86ms
## ##
cpus: $CPU
memory: $MEM