Мелочи по композам и README

This commit is contained in:
2025-02-22 13:17:58 +08:00
parent 164e880821
commit 8de39dbee3
5 changed files with 22 additions and 10 deletions

2
.gitignore vendored
View File

@@ -3,6 +3,8 @@
/opengist/*.yml
/opengist/data/
*compose.override.yml
*compose.override.yaml
.env
*.zip
*.tar

View File

@@ -1,8 +1,10 @@
# Gitea + OpenGist docker environment
Подробности: https://axenov.dev/gitea-to-docker
Ниже краткая выжимка этого поста.
Стек:
- git, ssh, scp, nginx, certbot, docker, docker-compose-plugin, любой текстовый редактор
- gitea (latest) + mariadb 10.6
- opengist (latest) + mariadb 10.6
@@ -25,7 +27,7 @@
5. Убедиться, что владельцем `./` является юзер с `UID`=`1000`, если не -- `cd ..; chown -R 1000:1000 gitea; cd -`
6. Запустить через `docker compose up -d --build`
7. Проверить логи через `docker logs -f ...`
8. Проверить веб-морды через `curl -i localhost:...`
8. Проверить веб-морды через `curl -I localhost:...`
Опционально, если есть домены:
@@ -90,9 +92,9 @@
3. Создать конфиг `/etc/ssh/sshd_config.d/gitea.conf` следующее:
```shell
Match User git
AuthorizedKeysCommandUser git
AuthorizedKeysCommand /usr/bin/docker exec -i gitea /usr/local/bin/gitea keys -e git -u %u -t %t -k %k
Match User git
AuthorizedKeysCommandUser git
AuthorizedKeysCommand /usr/bin/docker exec -i gitea /usr/local/bin/gitea keys -e git -u %u -t %t -k %k
```
4. Перезапустить демона через `systemctl restart sshd`

View File

@@ -0,0 +1,14 @@
################################################
# Rename this file to compose.override.yml if
# you need to restore database backups. Also
# you can override another settings here.
################################################
services:
gitea-db:
volumes:
- ./gitea/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz
opengist-db:
volumes:
- ./opengist/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz

View File

@@ -28,7 +28,6 @@ services:
- GITEA__database__USER=${GITEA_DB_USER:?check your .env file}
- GITEA__database__PASSWD=${GITEA_DB_PASSWORD:?check your .env file}
volumes:
# copy backup files first to pass them inside
- ./gitea/app.ini:/etc/gitea/app.ini
- ./gitea/data:/var/lib/gitea
ports:
@@ -48,8 +47,6 @@ services:
- MARIADB_DATABASE=${GITEA_DB_NAME:?check your .env file}
volumes:
- gitea-db:/var/lib/mysql
# copy dump file first to import it automatically
- ./gitea/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz
ports:
- ${HOST_DB_PORT:-3306}:3306
@@ -63,7 +60,6 @@ services:
- ${OG_HOST_WEB_PORT:-8081}:6157
- ${OG_HOST_SSH_PORT:-223}:2222
volumes:
# copy backup files first to pass them inside
- ./opengist/data:/opengist
depends_on:
- opengist-db
@@ -79,7 +75,5 @@ services:
- MARIADB_DATABASE=${OG_DB_NAME:?check your .env file}
volumes:
- opengist-db:/var/lib/mysql
# copy dump file first to import it automatically
- ./opengist/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz
ports:
- ${HOST_DB_PORT:-3307}:3306

View File