commit 9e886d7d2ee083e9845ea0f64e32200e5b1073bd Author: Kienan Stewart Date: Sun Sep 11 09:03:29 2022 -0400 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..c41391d --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Gitea container + +## Development + +## Production diff --git a/container-compose.prod.yml b/container-compose.prod.yml new file mode 100644 index 0000000..771370c --- /dev/null +++ b/container-compose.prod.yml @@ -0,0 +1,13 @@ +--- +version: '3' + +networks: + web: + external: false + +services: + gitea: + volumes: + - data:/data + ports: + - "9001:3000" diff --git a/container-compose.yml b/container-compose.yml new file mode 100644 index 0000000..f222e69 --- /dev/null +++ b/container-compose.yml @@ -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 + diff --git a/examples/gitea.toml b/examples/gitea.toml new file mode 100644 index 0000000..fd8744b --- /dev/null +++ b/examples/gitea.toml @@ -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/"