changes
This commit is contained in:
parent
e083ae0589
commit
e44e9c3d9c
@ -1,2 +1,2 @@
|
|||||||
/secrets
|
/secrets
|
||||||
/.git
|
/.git
|
||||||
2
.env.dev
2
.env.dev
@ -1,2 +1,2 @@
|
|||||||
DOMAIN=corp.hm
|
DOMAIN=corp.hm
|
||||||
CERT_RESOLVER=local
|
CERT_RESOLVER=local
|
||||||
@ -1,2 +1,2 @@
|
|||||||
DOMAIN=checkerwars.com
|
DOMAIN=checkerwars.com
|
||||||
CERT_RESOLVER=le
|
CERT_RESOLVER=le
|
||||||
7
deploy-traefik.sh
Normal file
7
deploy-traefik.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
set -e
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
sudo docker network create proxynet
|
||||||
|
sudo git clone https://git.rozenlab.com/leo/repo-server.git
|
||||||
|
|
||||||
|
echo "Traefik OK"
|
||||||
144
gitea.yml
144
gitea.yml
@ -1,72 +1,72 @@
|
|||||||
services:
|
services:
|
||||||
gitea:
|
gitea:
|
||||||
image: gitea/gitea:1.22.0
|
image: gitea/gitea:1.22.0
|
||||||
container_name: gitea
|
container_name: gitea
|
||||||
env_file:
|
env_file:
|
||||||
- ./secrets/vars.env
|
- ./secrets/vars.env
|
||||||
environment:
|
environment:
|
||||||
- APP_NAME="Gitea"
|
- APP_NAME="Gitea"
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
- USER=git
|
- USER=git
|
||||||
- RUN_MODE=prod
|
- RUN_MODE=prod
|
||||||
- DOMAIN=gitea.${DOMAIN}
|
- DOMAIN=gitea.${DOMAIN}
|
||||||
|
|
||||||
- SSH_DOMAIN=gitea.${DOMAIN}
|
- SSH_DOMAIN=gitea.${DOMAIN}
|
||||||
- HTTP_PORT=3000
|
- HTTP_PORT=3000
|
||||||
- ROOT_URL=https://gitea.${DOMAIN}
|
- ROOT_URL=https://git.${DOMAIN}
|
||||||
- SSH_PORT=222
|
- SSH_PORT=222
|
||||||
- SSH_LISTEN_PORT=22
|
- SSH_LISTEN_PORT=22
|
||||||
- GITEA__cache__ENABLED=true
|
- GITEA__cache__ENABLED=true
|
||||||
- GITEA__cache__ADAPTER=redis
|
- GITEA__cache__ADAPTER=redis
|
||||||
- GITEA__cache__HOST=redis://gitea-cache:6379/0?pool_size=100&idle_timeout=180s
|
- GITEA__cache__HOST=redis://gitea-cache:6379/0?pool_size=100&idle_timeout=180s
|
||||||
- GITEA__cache__ITEM_TTL=24h
|
- GITEA__cache__ITEM_TTL=24h
|
||||||
|
|
||||||
- GITEA__database__DB_TYPE=postgres
|
- GITEA__database__DB_TYPE=postgres
|
||||||
- GITEA__database__HOST=postgres:5432
|
- GITEA__database__HOST=postgres:5432
|
||||||
- GITEA__database__NAME=gitea
|
- GITEA__database__NAME=gitea
|
||||||
- GITEA__database__USER=gitea
|
- GITEA__database__USER=gitea
|
||||||
- GITEA__database__PASSWD=${GITEA_DB_PW}
|
- GITEA__database__PASSWD=${GITEA_DB_PW}
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- proxynet
|
- proxynet
|
||||||
depends_on:
|
depends_on:
|
||||||
gitea-cache:
|
gitea-cache:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.gitea.rule=Host(`gitea.${DOMAIN}`)"
|
- "traefik.http.routers.gitea.rule=Host(`git.${DOMAIN}`)"
|
||||||
- "traefik.http.routers.gitea.entrypoints=https"
|
- "traefik.http.routers.gitea.entrypoints=https"
|
||||||
- "traefik.http.routers.gitea.service=gitea-service"
|
- "traefik.http.routers.gitea.service=gitea-service"
|
||||||
- "traefik.http.services.gitea-service.loadbalancer.server.port=3000"
|
- "traefik.http.services.gitea-service.loadbalancer.server.port=3000"
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
max-size: "1m"
|
max-size: "1m"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/gitea:/data
|
- ./data/gitea:/data
|
||||||
- /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"
|
||||||
- "222:22"
|
- "222:22"
|
||||||
|
|
||||||
gitea-cache:
|
gitea-cache:
|
||||||
container_name: gitea-cache
|
container_name: gitea-cache
|
||||||
image: redis:7.2.5-alpine3.20
|
image: redis:7.2.5-alpine3.20
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- proxynet
|
- proxynet
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 30
|
retries: 30
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
max-size: "1m"
|
max-size: "1m"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxynet:
|
proxynet:
|
||||||
external: true
|
external: true
|
||||||
|
|||||||
65
readme.md
65
readme.md
@ -1,65 +0,0 @@
|
|||||||
Init:
|
|
||||||
|
|
||||||
sudo git clone git@rozenlab.com:leo/repo-server.git && sudo docker network create proxynet && cd repo-server && sudo chmod +x start.sh
|
|
||||||
|
|
||||||
sudo git pull git@rozenlab.com:leo/repo-server.git
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
All run:
|
|
||||||
|
|
||||||
sudo ./start.sh
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Traefik run:
|
|
||||||
|
|
||||||
Development:
|
|
||||||
sudo docker compose --env-file .env.dev -f traefik.yml up -d
|
|
||||||
|
|
||||||
Production:
|
|
||||||
sudo docker compose --env-file .env.prod -f traefik.yml up -d
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
Gitea run:
|
|
||||||
|
|
||||||
Development:
|
|
||||||
sudo docker compose --env-file .env.dev -f gitea.yml up -d
|
|
||||||
|
|
||||||
Production:
|
|
||||||
sudo docker compose --env-file .env.prod -f gitea.yml up -d
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
Postgres run:
|
|
||||||
|
|
||||||
Development:
|
|
||||||
sudo docker compose -f postgres.yml up -d
|
|
||||||
|
|
||||||
Production:
|
|
||||||
sudo docker compose -f postgres.yml up -d
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
Pgadmin run:
|
|
||||||
|
|
||||||
Development:
|
|
||||||
sudo docker compose --env-file .env.dev -f pgadmin.yml up -d
|
|
||||||
|
|
||||||
Production:
|
|
||||||
sudo docker compose --env-file .env.prod -f pgadmin.yml up -d
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
Nginx run:
|
|
||||||
|
|
||||||
Development:
|
|
||||||
sudo docker compose --env-file .env.dev -f nginx.yml up -d
|
|
||||||
|
|
||||||
Production:
|
|
||||||
sudo docker compose --env-file .env.prod -f nginx.yml up -d
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
tls:
|
tls:
|
||||||
certificates:
|
certificates:
|
||||||
- certFile: "/secrets/selfsigned/selfsigned.crt"
|
- certFile: "/secrets/selfsigned/selfsigned.crt"
|
||||||
keyFile: "/secrets/selfsigned/selfsigned.key"
|
keyFile: "/secrets/selfsigned/selfsigned.key"
|
||||||
Loading…
Reference in New Issue
Block a user