update gluster config steps and update forgejo compose for real world
This commit is contained in:
parent
7e283f76b5
commit
6dde5dcfc7
2 changed files with 19 additions and 15 deletions
|
|
@ -4,25 +4,24 @@ services:
|
||||||
container_name: fj-node${FJ_NODE_ID}
|
container_name: fj-node${FJ_NODE_ID}
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- FORGEJO__database__DB_TYPE=${FJ_DB_TYPE}
|
- FORGEJO__database__DB_TYPE=mysql
|
||||||
- FORGEJO__database__HOST=${FJ_DB_HOST}
|
- FORGEJO__database__HOST=172.16.201.150
|
||||||
- FORGEJO__database__PORT=${FJ_DB_PORT}
|
- FORGEJO__database__PORT=3306
|
||||||
- FORGEJO__database__NAME=${FJ_DB_NAME}
|
- FORGEJO__database__NAME=${FJ_DB_NAME}
|
||||||
- FORGEJO__database__USER=${FJ_DB_USER}
|
- FORGEJO__database__USER=${FJ_DB_USER}
|
||||||
- FORGEJO__database__PASSWD=${FJ_DB_PASS}
|
- FORGEJO__database__PASSWD=${FJ_DB_PASS}
|
||||||
- FORGEJO__storage__TYPE=${FJ_STORE_TYPE}
|
- FORGEJO__server__DOMAIN=git.${TRAEFIK_DNS_SUFFIX}
|
||||||
- FORGEJO__storage__MINIO_ENDPOINT=${FJ_STORE_ENDPOINT}
|
- FORGEJO__server__ROOT_URL=https://git.${TRAEFIK_DNS_SUFFIX}/
|
||||||
- FORGEJO__storage__MINIO_ACCESS_KEY_ID=${FJ_STORE_KEY}
|
- FORGEJO__server__SSH_PORT=2222
|
||||||
- FORGEJO__storage__MINIO_SECRET_ACCESS_KEY=${FJ_STORE_SECRET}
|
|
||||||
- FORGEJO__storage__MINIO_BUCKET=${FJ_STORE_BUCKET}
|
|
||||||
- FORGEJO__storage__MINIO_USE_SSL=false
|
|
||||||
volumes:
|
volumes:
|
||||||
- /docker/forgejo/data:/data
|
- /mnt/git_data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- "3022:3000"
|
- "3022:3000"
|
||||||
- "2222:22"
|
- "2222:22"
|
||||||
networks:
|
networks:
|
||||||
- fj_internal
|
|
||||||
- fj_external
|
- fj_external
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
|
|
@ -45,7 +44,5 @@ services:
|
||||||
# Forgejo benefits from sticky sessions to keep the web-git terminal stable
|
# Forgejo benefits from sticky sessions to keep the web-git terminal stable
|
||||||
- "traefik.http.services.forgejo-common-svc.loadbalancer.sticky.cookie=true"
|
- "traefik.http.services.forgejo-common-svc.loadbalancer.sticky.cookie=true"
|
||||||
networks:
|
networks:
|
||||||
fj_internal:
|
|
||||||
external: true
|
|
||||||
fj_external:
|
fj_external:
|
||||||
driver: bridge
|
external: true
|
||||||
|
|
@ -42,4 +42,11 @@ gluster volume start git_vol
|
||||||
mkdir -p /mnt/shared/git
|
mkdir -p /mnt/shared/git
|
||||||
echo "localhost:/git_vol /mnt/shared/git glusterfs defaults,_netdev 0 0" >> /etc/fstab
|
echo "localhost:/git_vol /mnt/shared/git glusterfs defaults,_netdev 0 0" >> /etc/fstab
|
||||||
mount -a
|
mount -a
|
||||||
df -h /mnt/shared/git
|
df -h /mnt/shared/git
|
||||||
|
|
||||||
|
##for any of the LXC's that need access to the gluster fs use this:
|
||||||
|
nano /etc/pve/lxc/{YOUR_LXC_ID}.conf #replace the {} section with the numerical value
|
||||||
|
add:
|
||||||
|
mp0: /mnt/shared/git,mp=/mnt/git_data
|
||||||
|
pct stop {YOUR_LXC_ID} && pct start {YOUR_LXC_ID} #restart the lxc - replace the {} section with the numerical value
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue