diff --git a/.gitignore b/.gitignore index e0e28d3..e9bbc47 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ config.json postgres.env tubearchivist.env umami.env +gitea.env # example hooks docker-hook.json diff --git a/docker-compose_production.yml b/docker-compose_production.yml index 82bf9f8..b89bbcb 100644 --- a/docker-compose_production.yml +++ b/docker-compose_production.yml @@ -16,6 +16,7 @@ services: - front - tubearchivist_network - umami_network + - gitea_network nginx-proxy-acme: image: nginxproxy/acme-companion container_name: nginx-proxy-acme @@ -87,8 +88,8 @@ services: env_file: - ./env/umami.env environment: - - VIRTUAL_HOST=www.stats.tubearchivist.com - - LETSENCRYPT_HOST=www.stats.tubearchivist.com + - VIRTUAL_HOST=www.stats.tubearchivist.com,stats.tubearchivist.com + - LETSENCRYPT_HOST=www.stats.tubearchivist.com,stats.tubearchivist.com depends_on: - umami-db restart: always @@ -105,6 +106,38 @@ services: restart: always networks: - umami_network + # gitea + gitea: + image: gitea/gitea + container_name: gitea + hostname: gitea + env_file: + - ./env/gitea.env + environment: + - VIRTUAL_HOST=git.tubearchivist.com,www.git.tubearchivist.com + - LETSENCRYPT_HOST=git.tubearchivist.com,www.git.tubearchivist.com + - VIRTUAL_PORT=3000 + restart: always + volumes: + - ./volume/gitea/data:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + expose: + - "3000" + ports: + - '127.0.0.1:22:22' + networks: + - gitea_network + gitea-db: + image: postgres:14 + container_name: gitea-db + restart: always + env_file: + - ./env/gitea.env + volumes: + - ./volume/gitea/db:/var/lib/postgresql/data + networks: + - gitea_network networks: front: @@ -113,3 +146,5 @@ networks: driver: bridge umami_network: driver: bridge + gitea_network: + driver: bridge diff --git a/env/gitea.sample.env b/env/gitea.sample.env new file mode 100644 index 0000000..dbc03d7 --- /dev/null +++ b/env/gitea.sample.env @@ -0,0 +1,11 @@ +USER_UID=1000 +USER_GID=1000 +DB_TYPE=postgres +DB_HOST=gitea-db:5432 +DB_NAME=gitea +DB_USER=gitea +DB_PASSWD=xxxxxxxxxxxxxxx + +POSTGRES_USER=gitea +POSTGRES_PASSWORD=xxxxxxxxxxxxxxx +POSTGRES_DB=gitea \ No newline at end of file diff --git a/tubearchivist/gitea/public/img/tube-archivist-logo-dark.png b/tubearchivist/gitea/public/img/tube-archivist-logo-dark.png new file mode 100644 index 0000000..2883aac Binary files /dev/null and b/tubearchivist/gitea/public/img/tube-archivist-logo-dark.png differ diff --git a/tubearchivist/gitea/templates/home.tmpl b/tubearchivist/gitea/templates/home.tmpl new file mode 100644 index 0000000..02607fa --- /dev/null +++ b/tubearchivist/gitea/templates/home.tmpl @@ -0,0 +1,23 @@ +{{template "base/head" .}} +