Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e0f0e3fa7 | |||
|
|
1c2caf5c80 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
|||||||
|
/data/
|
||||||
|
/git/
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# SSH private keys
|
# SSH private keys
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|||||||
15
Caddyfile
15
Caddyfile
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
email {$ACME_EMAIL}
|
|
||||||
}
|
|
||||||
|
|
||||||
git.tvheggland.no {
|
|
||||||
rate_limit {
|
|
||||||
zone git_zone {
|
|
||||||
key {remote_host}
|
|
||||||
events 30
|
|
||||||
window 10s
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
reverse_proxy gitea:3000
|
|
||||||
}
|
|
||||||
10
Dockerfile
10
Dockerfile
@@ -1,10 +0,0 @@
|
|||||||
FROM caddy:2-builder AS builder
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
|
||||||
--mount=type=cache,target=/root/.cache/go-build \
|
|
||||||
xcaddy build \
|
|
||||||
--with github.com/mholt/caddy-ratelimit
|
|
||||||
|
|
||||||
FROM caddy:2
|
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
|
||||||
@@ -18,43 +18,17 @@ services:
|
|||||||
GITEA__repository__ENABLE_PUSH_CREATE_USER: "${GITEA_ENABLE_PUSH_CREATE_USER}"
|
GITEA__repository__ENABLE_PUSH_CREATE_USER: "${GITEA_ENABLE_PUSH_CREATE_USER}"
|
||||||
GITEA__repository__ENABLE_PUSH_CREATE_ORG: "${GITEA_ENABLE_PUSH_CREATE_ORG}"
|
GITEA__repository__ENABLE_PUSH_CREATE_ORG: "${GITEA_ENABLE_PUSH_CREATE_ORG}"
|
||||||
volumes:
|
volumes:
|
||||||
- ../data:/data
|
- ./data:/data
|
||||||
- ../git:/git
|
- ./git:/git
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
# - "3000:3000"
|
||||||
- "2222:22"
|
- "2222:22"
|
||||||
networks:
|
networks:
|
||||||
- gitea_net
|
- caddy_net
|
||||||
|
|
||||||
|
|
||||||
caddy:
|
|
||||||
build: .
|
|
||||||
container_name: caddy
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
- gitea
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
volumes:
|
|
||||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
||||||
- caddy_data:/data
|
|
||||||
- caddy_config:/config
|
|
||||||
networks:
|
|
||||||
- gitea_net
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea_net:
|
caddy_net:
|
||||||
driver: bridge
|
external: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
caddy_data:
|
|
||||||
caddy_config:
|
|
||||||
|
|||||||
15
env.example
Normal file
15
env.example
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
USER_UID=1000
|
||||||
|
USER_GID=1000
|
||||||
|
|
||||||
|
GITEA_DOMAIN=git.example.com
|
||||||
|
GITEA_ROOT_URL=https://git.example.com/
|
||||||
|
GITEA_SSH_DOMAIN=git.example.com
|
||||||
|
GITEA_SSH_PORT=22
|
||||||
|
|
||||||
|
GITEA_REPOSITORY_ROOT=/git
|
||||||
|
GITEA_DEFAULT_PRIVATE=true
|
||||||
|
GITEA_DEFAULT_PUSH_CREATE_PRIVATE=true
|
||||||
|
GITEA_ENABLE_PUSH_CREATE_USER=true
|
||||||
|
GITEA_ENABLE_PUSH_CREATE_ORG=true
|
||||||
|
|
||||||
|
ACME_EMAIL=you@example.com
|
||||||
Reference in New Issue
Block a user