cd /home/myusername/docker
mkdir -p gitea/data/gitea/public/assets/css && cd gitea && mkdir actrunner && cd "$_" && touch act-config.yml && cd ..
services:
db:
image: postgres:latest
container_name: gitea-postgresql
restart: unless-stopped
environment:
POSTGRES_DB: gitea
POSTGRES_USER: gitea
POSTGRES_PASSWORD: gitea!
volumes:
- ./db:/var/lib/postgresql/data
gitea:
image: gitea/gitea:latest
container_name: gitea
restart: unless-stopped
environment:
USER_UID: 1000
USER_GID: 1000
GITEA__database__DB_TYPE: postgres
GITEA__database__HOST: db
GITEA__database__NAME: gitea
GITEA__database__USER: gitea
GITEA__database__PASSWD: gitea!
volumes:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- 8223:3000
- 8224:22 # Optional for SSH Access
depends_on:
- db
actrunner:
image: gitea/act_runner:latest
container_name: gitea-act-runner
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./actrunner/data:/data
- ./actrunner/act-config.yml:/act-config.yml
environment:
GITEA_RUNNER_NAME: gitea-act-runner
GITEA_INSTANCE_URL: http://localhost:8223
GITEA_RUNNER_REGISTRATION_TOKEN: insert_registration_token_here
docker compose up -d
Go to: Site Administration -> Actions -> Runners
Click on: Create new Runner
Copy and paste the REGISTRATION TOKEN into docker-compose.yml at actrunner replace the insert_registration_token_here
docker compose up -d
cd /home/myusername/docker/gitea/conf
nano app.ini
Insert the following lines at the bottom:
[ui]
THEMES = github, my-custom-theme
DEFAULT_THEME = github
Download the following theme file:
Upload the file to:
cd /home/myusername/docker/gitea/public/assets/css
cd /home/myusername/docker/gitea/data/gitea
mkdir templates && cd "$_"
Download and Import the following files into the templates folder
cd /home/myusername/docker/gitea/data/gitea/public/assets/css
Download and Import the following css file into the css folder
cd /home/myusername/docker/gitea/data/gitea/templates
mkdir -p user/auth && cd "$_"
Download and Import the following files into the auth folder
link_account.tmpl
signup.tmpl
signin.tmpl
Go to: Admin interface -> Flows & Stages -> Flows
Edit default-authentication-flow
Click on Appearance settings and upload a custom Background image
cd /home/myusername/docker/gitea/data/gitea/conf
nano app.ini
[mailer]
ENABLED = true
FROM = [email protected]
MAILER_TYPE = smtp
SMTP_ADDR = mail.DOMAIN.COM
SMTP_PORT = 587
IS_TLS_ENABLED = false
USER = [email protected]
PASSWD = REPLACE_WITH_YOUR_EMAIL_PASSWORD
Make sure to save the Client ID and Client Secret because you need it later
Make sure to save the OpenID Configuration URL because you need it later
Site Administration > Identity & Access > Authentication SourcesAdd Authentication SourceAdd Authentication SourceOAuth2AuthentikOpenID ConnectPASTE_THE_CLIENT_ID_YOU_SAVEDPASTE_THE_CLIENT_SECRET_YOU_SAVEDhttps://authentik.DOMAIN.COM/static/dist/assets/icons/icon.svgPASTE_THE_OPENID_CONFIGURATION_URL_YOU_SAVEDemail profile