Мелочи по композам и README
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,6 +3,8 @@
|
||||
/opengist/*.yml
|
||||
/opengist/data/
|
||||
|
||||
*compose.override.yml
|
||||
*compose.override.yaml
|
||||
.env
|
||||
*.zip
|
||||
*.tar
|
||||
|
||||
10
README.md
10
README.md
@@ -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`
|
||||
|
||||
14
compose.override.yml.example
Normal file
14
compose.override.yml.example
Normal 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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user