run in docker behind nginx-proxy

This commit is contained in:
Iliyan Ivanov 2020-07-25 22:33:42 +03:00
parent 67f97309f6
commit 6d378689dd
Signed by: iliyan
GPG Key ID: A20B95830B5794F3
6 changed files with 51 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
**

8
.gitconfig Normal file
View File

@ -0,0 +1,8 @@
[user]
name = Gitea
email = gitea@fake.local
[core]
quotePath = false
commitGraph = true
[gc]
writeCommitGraph = true

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/data
/custom
/log
/.env

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM debian:10
ENV TERM=xterm \
TZ=Europe/Sofia \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
git \
screen \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd gitea -g 1000 \
&& useradd -u 1000 -g 1000 -m gitea -d /app
EXPOSE 3000
USER gitea
CMD /app/gitea

20
docker-compose.yml Normal file
View File

@ -0,0 +1,20 @@
version: '3.6'
services:
gitea:
build:
context: "./"
volumes:
- ${FULL_PATH}:${FULL_PATH}
environment:
- VIRTUAL_HOST=gitea-dev
- VIRTUAL_PORT=3000
restart: "unless-stopped"
command: "${FULL_PATH}/setup.sh"
tty: true
networks:
- nginx-proxy
networks:
nginx-proxy:
external:
name: nginx-proxy

View File

@ -165,3 +165,4 @@ for REPO in ${REPOS}; do
git push "$pushuri/${repoOwner}/${repoName}.git" master
)
done
grep 'docker' /proc/1/cgroup 1>/dev/null 2>/dev/null && screen -r "${SCREEN_SES_NAME}"