feat(gitea): rootless image
This commit is contained in:
parent
9bf662c5e2
commit
94d50fb7c3
@ -1,9 +1,7 @@
|
|||||||
BASE_URL=git.
|
BASE_URL=git.
|
||||||
EMAIL=
|
EMAIL=
|
||||||
POSTGRES_PASSWORD=
|
POSTGRES_PASSWORD=
|
||||||
|
SSH_PORT=22 # change this if you already use port 22 for server ssh
|
||||||
PUID=1000
|
|
||||||
PGID=1000
|
|
||||||
|
|
||||||
POSTGRES_DB=gitea
|
POSTGRES_DB=gitea
|
||||||
POSTGRES_USER=gitea
|
POSTGRES_USER=gitea
|
||||||
|
@ -23,10 +23,13 @@ services:
|
|||||||
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
|
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
|
||||||
|
|
||||||
gitea:
|
gitea:
|
||||||
image: docker.io/gitea/gitea:1.21
|
image: docker.io/gitea/gitea:1.21-rootless
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "$SSH_PORT:2222"
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data/
|
- data:/var/lib/gitea/
|
||||||
|
- config:/etc/gitea/
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
|
7
gitea/first_start.sh
Executable file
7
gitea/first_start.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
[ "$EUID" != 0 ] && {echo "This script need to run as root" >&2; exit 1;}
|
||||||
|
|
||||||
|
docker-compose up --no-start --build
|
||||||
|
chown -R 1000:1000 /var/lib/docker/volumes/gitea_*
|
||||||
|
docker-compose up -d --build
|
Loading…
Reference in New Issue
Block a user