+services:
+ gitd:
+ build:
+ context: .
+ dockerfile: ./Containerfile.gitd
+ ports:
+ - "2222:2222"
+ volumes:
+ - /srv/gitweb/repos:/srv/git/repos:Z
+ - ./gitd/sshd_config:/etc/ssh/sshd_config:ro,Z
+ - ./gitd/authorized_keys:/srv/git/.ssh/authorized_keys:ro,Z
+ cap_drop:
+ - ALL
+ cap_add:
+ - SETUID
+ - SETGID
+ - SYS_CHROOT
+ - AUDIT_WRITE
+ security_opt:
+ - no-new-privileges:true
+ restart: unless-stopped
+ networks:
+ - gitd
+
+ gitweb:
+ build:
+ context: .
+ dockerfile: ./Containerfile.gitweb
+ volumes:
+ - /srv/gitweb/repos:/srv/gitweb-repos:ro
+ - gitweb_run:/run/gitweb:U,Z
+ - gitweb_www:/usr/share/gitweb:ro
+ read_only: true
+ expose:
+ - "9000"
+ tmpfs:
+ - /tmp
+ cap_drop:
+ - ALL
+ security_opt:
+ - no-new-privileges:true
+ restart: unless-stopped
+ networks:
+ - gitweb
+
+ caddy:
+ image: docker.io/library/caddy
+ ports:
+ - "80:80"
+ - "443:443"
+ volumes:
+ - ./Caddyfile:/etc/caddy/Caddyfile:ro,Z
+ - caddy_data:/data:Z
+ - caddy_config:/config:Z
+ - ./logs/caddy:/var/log/caddy:Z
+ - gitweb_run:/run/gitweb:ro
+ - gitweb_www:/usr/share/gitweb:ro
+ restart: unless-stopped
+ depends_on:
+ - gitweb
+ networks:
+ - gitweb
+
+volumes:
+ caddy_data:
+ caddy_config:
+ gitweb_run:
+ gitweb_www:
+
+networks:
+ gitd:
+ gitweb: