-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
619 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.git | ||
**/node_modules | ||
mysql | ||
data | ||
data-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#Build stage | ||
FROM golang:1.18-alpine3.16 | ||
|
||
ARG GOPROXY | ||
ENV GOPROXY ${GOPROXY:-direct} | ||
|
||
ARG GITEA_VERSION | ||
ARG TAGS="sqlite sqlite_unlock_notify sqlite_json" | ||
ENV TAGS "bindata timetzdata $TAGS" | ||
ARG CGO_EXTRA_CFLAGS | ||
|
||
#Setup repo | ||
COPY . ${GOPATH}/src/code.gitea.io/gitea | ||
WORKDIR ${GOPATH}/src/code.gitea.io/gitea | ||
|
||
EXPOSE 22 3000 80 | ||
|
||
RUN apk --no-cache add \ | ||
bash \ | ||
ca-certificates \ | ||
curl \ | ||
gettext \ | ||
linux-pam \ | ||
openssh \ | ||
s6 \ | ||
sqlite \ | ||
su-exec \ | ||
gnupg \ | ||
make \ | ||
build-base \ | ||
git \ | ||
nodejs \ | ||
npm \ | ||
build-base | ||
|
||
RUN apk add git --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main | ||
|
||
RUN addgroup \ | ||
-S -g 1000 \ | ||
git && \ | ||
adduser \ | ||
-S -H -D \ | ||
-h /data/git \ | ||
-s /bin/bash \ | ||
-u 1000 \ | ||
-G git \ | ||
git && \ | ||
echo "git:*" | chpasswd -e | ||
|
||
ENV USER git | ||
ENV GITEA_CUSTOM /data/gitea | ||
|
||
VOLUME ["/data"] | ||
|
||
CMD sh -c 'ln -s /go/src/code.gitea.io /app'; tail -f /data/gitea/log/gitea.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: "3" | ||
|
||
services: | ||
dcs: | ||
container_name: dcs | ||
image: dcs-dev:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-dev | ||
user: "${UID}:${GID}" | ||
environment: | ||
- USER_UID="${UID}" | ||
- USER_GID="${GID}" | ||
- GITEA__database__DB_TYPE=mysql | ||
- GITEA__database__HOST=db:3306 | ||
- GITEA__database__NAME=gitea-release | ||
- GITEA__database__USER=gitea | ||
- GITEA__database__PASSWD=gitea | ||
- TAGS=bindata sqlite sqlite_unlock_notify sqlite_json | ||
restart: always | ||
networks: | ||
- gitea | ||
volumes: | ||
- /etc/timezone:/etc/timezone:ro | ||
- /etc/localtime:/etc/localtime:ro | ||
- ./data-release:/data | ||
- .:/go/src/code.gitea.io/gitea | ||
ports: | ||
- "${DCS_PORT-3000}:80" | ||
- "222:22" | ||
depends_on: | ||
- db | ||
stdin_open: true # docker run -i | ||
tty: true # docker run -t | ||
|
||
db: | ||
platform: linux/x86_64 | ||
image: mysql:5.7 | ||
restart: always | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=gitea | ||
- MYSQL_USER=gitea | ||
- MYSQL_PASSWORD=gitea | ||
- MYSQL_DATABASE=gitea-release | ||
networks: | ||
- gitea | ||
volumes: | ||
- ./mysql:/var/lib/mysql | ||
|
||
networks: | ||
gitea: | ||
external: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.