Difference between revisions of "Gitea"

From Organic Design wiki
(stub)
(No difference)

Revision as of 14:51, 14 January 2020

((stub}} We used the default Docker installation which was very straight forward. The only change to the default docker-compose.yml we made was to change the external ports to 333 since we already have Mastodon using port 3000. The HTTP port is also served on localhost only since it will be accessed via proxy only.

version: "2"
networks:
  gitea:
    external: false
services:
  server:
    image: gitea/gitea:latest
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - gitea
    volumes:
      - ./gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "127.0.0.1:333:3000"
      - "222:22"


Nginx reverse proxy

Setting up Nginx as a reverse proxy server means that you can use a normal default port and redirect requests to the docker service internally. For us the site runs as HTTPS publicly which is done with a simple virtual host container and all our existing SSL set up that's already in place for all the sites. The reverse proxy the redirects requests to Gitea internally unencrypted so we don't need to bother with any SSL or certificate configuration there.

server {
	listen 443 ssl;
	listen [::]:443 ssl;
	server_name code.organicdesign.nz;
	include /var/www/work/nginx.ssl.conf;
	location / {
		proxy_pass http://localhost:3000;
	}
}

See also