Compare commits
5 Commits
fce313d45c
...
5fe22ee906
| Author | SHA1 | Date | |
|---|---|---|---|
| 5fe22ee906 | |||
| 1f7bbaa96b | |||
| aca4db7af6 | |||
|
|
6985d0dbc1 | ||
|
|
3e1d191bee |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -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
7
gitea/core/.env.example
Normal 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
25
gitea/core/compose.yml
Normal 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
6
nextcloud/backup.sh
Executable 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
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user