Archive Legacy Setup And Add Ansible Control Plane

This commit is contained in:
Dmitry
2026-07-08 12:47:37 +03:00
parent 841d56380b
commit 4bafa7d09e
203 changed files with 1663 additions and 11 deletions
@@ -0,0 +1,7 @@
services:
ada-dev:
image: git.ada-dev.ru/ada/ada-dev.ru:latest
container_name: ada-dev-ru
restart: unless-stopped
ports:
- "7080:80"
@@ -0,0 +1,4 @@
FROM gitea/act_runner:latest
USER root
RUN apk add --no-cache docker-cli docker-cli-compose openssh-client
@@ -0,0 +1,13 @@
services:
gitea-runner:
build: .
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/services:/opt/services
- /opt/data/gitea-runner:/data
environment:
GITEA_INSTANCE_URL: https://git.ada-dev.ru
GITEA_RUNNER_REGISTRATION_TOKEN: ${TOKEN}
GITEA_RUNNER_NAME: cloud-pc-runner
GITEA_RUNNER_LABELS: cloud-pc
@@ -0,0 +1,23 @@
services:
gitea:
environment:
USER_GID: "1000"
USER_UID: "1000"
hostname: gitea
image: gitea/gitea:latest
network_mode: bridge
ports:
- target: 3000
published: "3002"
protocol: tcp
- target: 22
published: "2222"
protocol: tcp
restart: unless-stopped
volumes:
- type: bind
source: /opt/data/gitea
target: /data
networks:
default:
name: gitea_default
@@ -0,0 +1,6 @@
services:
neural:
ports:
- 4567:4567
image: git.ada-dev.ru/ada/lr_miad_nn:latest
networks: {}
@@ -0,0 +1,52 @@
services:
redis:
image: redis:alpine
container_name: redis
hostname: redis
restart: unless-stopped
environment:
TZ: Europe/Moscow
nextcloud:
image: nextcloud:${NC_VER}
container_name: nextcloud
hostname: nextcloud
restart: unless-stopped
ports:
- 8081:80
dns:
- 8.8.8.8
extra_hosts:
- ${NC_DOMAIN}:host-gateway
depends_on:
- redis
volumes:
- /opt/configs/nextcloud/app:/var/www/html
- /opt/data/nextcloud:/var/www/html/data
- /mnt/yandex:/mnt/yandex:shared
environment:
TZ: Europe/Moscow
VIRTUAL_HOST: ${NC_DOMAIN}
NEXTCLOUD_TRUSTED_DOMAINS: ${NC_DOMAIN} 127.0.0.1
NEXTCLOUD_OVERWRITEPROTOCOL: https
NEXTCLOUD_OVERWRITEHOST: ${NC_DOMAIN}
NEXTCLOUD_OVERWRITECLIURL: https://${NC_DOMAIN}
REDIS_HOST: redis
TRUSTED_PROXIES: ${TRUSTED_PROXIES}
cron:
image: nextcloud:${NC_VER}
hostname: cron
container_name: cron
restart: unless-stopped
volumes:
- /opt/configs/nextcloud/app:/var/www/html
- /opt/data/nextcloud:/var/www/html/data
entrypoint: /cron.sh
depends_on:
- nextcloud
environment:
TZ: Europe/Moscow
REDIS_HOST: redis
networks: {}
@@ -0,0 +1,98 @@
version = "1"
[global]
scheduler = "systemd"
# ── Общие настройки ────────────────────────────────────────────────────────────
[default]
password-file = "/etc/restic/password"
initialize = true
[default.forget]
keep-daily = 7
keep-weekly = 4
keep-monthly = 6
schedule-permission = "system"
schedule-after-backup = true
prune = true
[default.check]
schedule = "Sun 04:00"
schedule-permission = "system"
# ── Данные и конфиги сервисов ─────────────────────────────────────────────────
[services]
inherit = "default"
repository = "/mnt/backup/restic/services"
[services.backup]
source = ["/opt/data", "/opt/configs"]
tag = ["cloud-pc", "services"]
exclude-caches = true
one-file-system = true
schedule = "02:00"
schedule-permission = "system"
schedule-log = "/var/log/resticprofile/services.log"
[services.forget]
schedule = "02:30"
# ── Samba-шара ────────────────────────────────────────────────────────────────
[samba]
inherit = "default"
repository = "/mnt/backup/restic/samba"
[samba.backup]
source = ["/opt/samba"]
tag = ["cloud-pc", "samba"]
exclude-caches = true
one-file-system = true
schedule = "03:00"
schedule-permission = "system"
schedule-log = "/var/log/resticprofile/samba.log"
[samba.forget]
schedule = "03:30"
# ── Yandex Disk: ночная удалённая копия ───────────────────────────────────────
[yadisk-default]
inherit = "default"
[yadisk-default.check]
schedule = "Sun 06:00"
schedule-permission = "system"
schedule-after-network-online = true
[yadisk-services]
inherit = "yadisk-default"
repository = "rclone:yadisk:System/Backups/cloud-pc/restic/services"
[yadisk-services.backup]
source = ["/opt/data", "/opt/configs"]
tag = ["cloud-pc", "services", "yadisk"]
exclude-caches = true
one-file-system = true
schedule = "04:00"
schedule-permission = "system"
schedule-after-network-online = true
schedule-log = "/var/log/resticprofile/yadisk-services.log"
[yadisk-services.forget]
schedule = "04:30"
[yadisk-samba]
inherit = "yadisk-default"
repository = "rclone:yadisk:System/Backups/cloud-pc/restic/samba"
[yadisk-samba.backup]
source = ["/opt/samba"]
tag = ["cloud-pc", "samba", "yadisk"]
exclude-caches = true
one-file-system = true
schedule = "05:00"
schedule-permission = "system"
schedule-after-network-online = true
schedule-log = "/var/log/resticprofile/yadisk-samba.log"
[yadisk-samba.forget]
schedule = "05:30"
@@ -0,0 +1 @@
SAMBA_PASSWORD=
@@ -0,0 +1,16 @@
services:
samba:
image: ghcr.io/servercontainers/samba:latest
container_name: samba
restart: unless-stopped
network_mode: host
volumes:
- /opt/samba/media:/shares/media
- /opt/samba/documents:/shares/documents
- /opt/samba/backups_win:/shares/backups_win
environment:
ACCOUNT_ada: ${SAMBA_PASSWORD}
UID_ada: "1000"
SAMBA_VOLUME_CONFIG_media: "[media]; path = /shares/media; valid users = ada; read only = no"
SAMBA_VOLUME_CONFIG_documents: "[documents]; path = /shares/documents; valid users = ada; read only = no"
SAMBA_VOLUME_CONFIG_backups_win: "[backups_win]; path = /shares/backups_win; valid users = ada; read only = no"
@@ -0,0 +1,14 @@
services:
syncthing:
image: syncthing/syncthing:latest
container_name: syncthing
hostname: cloud-pc
environment:
PUID: "1000"
PGID: "1000"
STGUIADDRESS: 0.0.0.0:8384
volumes:
- /opt/configs/syncthing:/var/syncthing/config
- /opt/data/syncthing:/var/syncthing/data
network_mode: host
restart: unless-stopped
@@ -0,0 +1,15 @@
services:
zerotier:
container_name: zerotier
restart: unless-stopped
network_mode: host
cap_add:
- NET_ADMIN
- SYS_ADMIN
devices:
- /dev/net/tun
volumes:
- /opt/data/zerotier:/var/lib/zerotier-one
image: zerotier/zerotier:latest
command: ["743993800fa5a34c"]
networks: {}