From 8e6e5aed20054af269c1885a5b6896a3985848d0 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 2 Jan 2025 20:26:21 +0800 Subject: [PATCH] up(gitea): update stack yaml --- gitea/env.cfg | 4 +++- gitea/lky-prod.yml | 24 ++++++++++++++++++++++++ gitea/{prod.stack.yml => rpi-prod.yml} | 12 ++++++------ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 gitea/lky-prod.yml rename gitea/{prod.stack.yml => rpi-prod.yml} (76%) diff --git a/gitea/env.cfg b/gitea/env.cfg index 1374950..f18c0f4 100644 --- a/gitea/env.cfg +++ b/gitea/env.cfg @@ -1,2 +1,4 @@ IMAGE_TAG=gitea/gitea:1.22.6-rootless -Volumes_PATH=/data/volumes/gitea \ No newline at end of file +Volumes_PATH=/data/volumes/gitea +LAY_SSH_HOST_PORT=22 +SSH_HOST_PORT=2222 \ No newline at end of file diff --git a/gitea/lky-prod.yml b/gitea/lky-prod.yml new file mode 100644 index 0000000..7e59937 --- /dev/null +++ b/gitea/lky-prod.yml @@ -0,0 +1,24 @@ +# mkdir -pv /data/volumes/gitea/{data,config} +# cd gitea by lcayun +# chown 1000:1000 config/ data/ +# pull:: docker compose --env-file ./gitea/env.cfg -f ./gitea/lky-prod.yml up pull +# RUN:: docker compose -p gitea --env-file ./gitea/env.cfg -f ./gitea/lky-prod.yml up -d + +services: + + gitea: + image: ${IMAGE_TAG} + restart: always + container_name: gitea-app + environment: + - USER_UID=1000 + - USER_GID=1000 + - TZ=Asia/Shanghai + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + - ${Volumes_PATH}/data:/var/lib/gitea + - ${Volumes_PATH}/config:/etc/gitea + ports: + - 3000:3000 + - ${LAY_SSH_HOST_PORT}:2222 \ No newline at end of file diff --git a/gitea/prod.stack.yml b/gitea/rpi-prod.yml similarity index 76% rename from gitea/prod.stack.yml rename to gitea/rpi-prod.yml index f6c5d99..1091995 100644 --- a/gitea/prod.stack.yml +++ b/gitea/rpi-prod.yml @@ -1,8 +1,8 @@ # mkdir -pv /data/volumes/gitea/{data,config} -# cd gitea +# cd gitea by Raspberry pi # chown 1000:1000 config/ data/ -# pull:: docker compose --env-file ./gitea/env.cfg -f ./gitea/prod.stack.yml pull -# Run:: docker compose -p gitea --env-file ./gitea/env.cfg -f ./gitea/prod.stack.yml up -d +# pull:: docker compose --env-file ./gitea/env.cfg -f ./gitea/rpi-prod.yml pull +# Run:: docker compose -p gitea --env-file ./gitea/env.cfg -f ./gitea/rpi-prod.yml up -d services: @@ -13,12 +13,12 @@ services: environment: - USER_UID=1000 - USER_GID=1000 - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - TZ=Asia/Shanghai volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro - ${Volumes_PATH}/data:/var/lib/gitea - ${Volumes_PATH}/config:/etc/gitea ports: - 3000:3000 - - 2222:2222 + - ${SSH_HOST_PORT}:2222