restructure services based on host machine
This commit is contained in:
11
nuc/gitea/.env.example
Normal file
11
nuc/gitea/.env.example
Normal file
@@ -0,0 +1,11 @@
|
||||
# DOMAIN_ROOT is the root domain that this service will register as with Traefik
|
||||
DOMAIN_ROOT=domain.tld
|
||||
|
||||
# USER_ID is the user id to run the service as. 0 for root
|
||||
USER_ID=1000
|
||||
|
||||
# GROUP_ID is the group id to run the service as. 0 for root
|
||||
GROUP_ID=1000
|
||||
|
||||
# SSH_PORT is the port that will be opened for ssh
|
||||
SSH_PORT=222
|
41
nuc/gitea/docker-compose.yml
Executable file
41
nuc/gitea/docker-compose.yml
Executable file
@@ -0,0 +1,41 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:latest
|
||||
container_name: gitea
|
||||
|
||||
hostname: gitea
|
||||
|
||||
environment:
|
||||
- USER_UID=${GROUP_ID}
|
||||
- USER_GID=${USER_ID}
|
||||
- DOMAIN_ROOT=${DOMAIN_ROOT}
|
||||
- "SSH_PORT=${SSH_PORT:-222}"
|
||||
|
||||
restart: always
|
||||
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.gitea.rule=Host(`gitea.${DOMAIN_ROOT}`)"
|
||||
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
|
||||
- 'traefik.http.routers.gitea.middlewares=authelia@docker'
|
||||
|
||||
|
||||
volumes:
|
||||
- gitea_data:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "${SSH_PORT}:222"
|
||||
|
||||
networks:
|
||||
- web
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
gitea_data:
|
||||
external: true
|
Reference in New Issue
Block a user