Initial commit

This commit is contained in:
Kienan Stewart 2022-09-11 09:03:29 -04:00
commit 9e886d7d2e
4 changed files with 76 additions and 0 deletions

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# Gitea container
## Development
## Production

View File

@ -0,0 +1,13 @@
---
version: '3'
networks:
web:
external: false
services:
gitea:
volumes:
- data:/data
ports:
- "9001:3000"

48
container-compose.yml Normal file
View File

@ -0,0 +1,48 @@
---
version: '3'
networks:
default:
web:
external: true
volumes:
db:
data:
services:
gitea:
image: docker.io/gitea/gitea:latest
container_name: gitea
depends_on:
- gitea-db
environment:
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=gitea-db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=${MARIADB_PASSWORD:-secret}"
restart: always
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- default
- web
ports:
- "2222:22"
gitea-db:
image: docker.io/mariadb:latest
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- db:/var/lib/mysql
environment:
- MARIADB_AUTO_UPGRADE=1
- MARIADB_ROOT_HOST=localhost
- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=yes
- MARIADB_DATABASE=gitea
- "MARIADB_PASSWORD=${MARIADB_PASSWORD:-secret}"
- MARIADB_USER=gitea

10
examples/gitea.toml Normal file
View File

@ -0,0 +1,10 @@
[http]
[http.routers]
[http.routers.gitea]
entryPoints = ["http"]
rule = "Host(`gitea.localhost`)"
service = "gitea"
[http.services]
[http.services.gitea.loadBalancer]
[[http.services.gitea.loadBalancer.servers]]
url = "http://gitea:3000/"