33 lines
839 B
YAML
33 lines
839 B
YAML
services:
|
|
init-permissions:
|
|
image: alpine:latest
|
|
user: root
|
|
volumes:
|
|
- /srv/gitea:/var/lib/gitea
|
|
- ./config:/etc/gitea
|
|
command: >
|
|
sh -c "chown -R 987:985 /etc/gitea && chmod -R 775 /etc/gitea"
|
|
server:
|
|
depends_on:
|
|
init-permissions:
|
|
condition: service_completed_successfully
|
|
image: docker.gitea.com/gitea:1.27.2-rootless
|
|
container_name: gitea
|
|
user: "987:985"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /srv/gitea:/var/lib/gitea
|
|
- ./config:/etc/gitea
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
- GITEA__server__RUN_USER=git
|
|
- GITEA__server__DOMAIN=gitea.jederik.net
|
|
- GITEA__server__SSH_PORT=7522
|
|
- GITEA__server__HTTP_PORT=3000
|
|
ports:
|
|
- "7522:22"
|
|
expose:
|
|
- 3000
|
|
|