diff --git a/gitea/README.md b/gitea/README.md new file mode 100644 index 0000000..0f21388 --- /dev/null +++ b/gitea/README.md @@ -0,0 +1,3 @@ +## Manual deployment notes +### Gitea +1. Create admin user in web UI on initial setup diff --git a/gitea/docker-compose.yml b/gitea/docker-compose.yml new file mode 100644 index 0000000..39538ce --- /dev/null +++ b/gitea/docker-compose.yml @@ -0,0 +1,43 @@ +version: "3" + +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:1.17.1 + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + restart: always + networks: + - gitea + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + # TODO: remove fixed host port number + ports: + - "3000:3000" + - "222:22" + depends_on: + - db + + db: + image: postgres:14 + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + networks: + - gitea + volumes: + - ./postgres:/var/lib/postgresql/data diff --git a/gitea/run-this-first.sh b/gitea/run-this-first.sh new file mode 100755 index 0000000..3c2c89d --- /dev/null +++ b/gitea/run-this-first.sh @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p ./gitea +mkdir -p ./postgres