Compare commits

...

5 Commits

Author SHA1 Message Date
5fe22ee906 feat: gitea 2025-10-03 18:47:44 +02:00
1f7bbaa96b begin gitea 2025-09-26 01:56:27 +02:00
aca4db7af6 pin nextcloud to major version 2025-09-23 11:16:14 +02:00
eneller
6985d0dbc1 sonarqube restart 2025-08-19 16:11:04 +00:00
jojo
3e1d191bee feat: nextcloud backup script 2025-08-07 09:27:33 +02:00
7 changed files with 47 additions and 6 deletions

6
.gitignore vendored
View File

@@ -1,5 +1,3 @@
.env
.docker
# Created by https://www.toptal.com/developers/gitignore/api/archives # Created by https://www.toptal.com/developers/gitignore/api/archives
# Edit at https://www.toptal.com/developers/gitignore?templates=archives # Edit at https://www.toptal.com/developers/gitignore?templates=archives
@@ -38,4 +36,6 @@
*.txz *.txz
# End of https://www.toptal.com/developers/gitignore/api/archives # End of https://www.toptal.com/developers/gitignore/api/archives
.env
.docker
backup/

7
gitea/core/.env.example Normal file
View File

@@ -0,0 +1,7 @@
USER_UID=1000
USER_GID=1000
GITEA__database__DB_TYPE=postgres
GITEA__database__HOST=db:5432
GITEA__database__NAME=gitea
GITEA__database__USER=gitea
GITEA__database__PASSWD=

25
gitea/core/compose.yml Normal file
View File

@@ -0,0 +1,25 @@
services:
gitea:
image: docker.gitea.com/gitea:1.24.6
restart: always
env_file:
- .env
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "50005:3000"
- "22:22"
depends_on:
- db
db:
image: docker.io/library/postgres:14
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
volumes:
- ./postgres:/var/lib/postgresql/data

6
nextcloud/backup.sh Executable file
View File

@@ -0,0 +1,6 @@
source .env
CONTAINER_APP=app
docker compose exec $CONTAINER_APP ./occ maintenance:mode --on
docker compose exec $MYSQL_HOST sh -c "mariadb-dump --single-transaction -h $MYSQL_HOST -u $MYSQL_USER --password=$MYSQL_PASSWORD $MYSQL_DATABASE > backup/nextcloud-sqlbkp_`date +'%Y%m%d'`.bak" \
&& echo "SQL dump saved"
docker compose exec $CONTAINER_APP ./occ maintenance:mode --off

View File

@@ -5,11 +5,12 @@ services:
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes: volumes:
- ./db:/var/lib/mysql - ./db:/var/lib/mysql
- ./backup:/backup
env_file: env_file:
- env - .env
app: app:
image: nextcloud image: nextcloud:31
restart: always restart: always
ports: ports:
- 50000:80 - 50000:80
@@ -18,4 +19,4 @@ services:
volumes: volumes:
- ./nextcloud:/var/www/html - ./nextcloud:/var/www/html
env_file: env_file:
- env - .env

View File

@@ -3,6 +3,7 @@ services:
sonarqube: sonarqube:
image: sonarqube:community image: sonarqube:community
hostname: sonarqube hostname: sonarqube
restart: always
container_name: sonarqube container_name: sonarqube
read_only: true read_only: true
depends_on: depends_on:
@@ -23,6 +24,7 @@ services:
- ${NETWORK_TYPE:-ipv4} - ${NETWORK_TYPE:-ipv4}
db: db:
image: postgres:17 image: postgres:17
restart: always
healthcheck: healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ] test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 10s interval: 10s