+
Skip to content

More helpful update #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 92 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
0d5397a
<feat> nginx: user nginx 1.15
fraoustin Mar 24, 2019
7e42534
Add mime-support package (/etc/mime.types) to enable mime-wise raw
sakurai-youhei Jul 29, 2019
46d6140
Merge pull request #1 from sakurai-youhei/feature/add-mime-support
fraoustin Jul 29, 2019
9661dc6
<feat> nginx: 1.19
fraoustin Aug 5, 2020
d05aff8
Merge branch 'develop'
fraoustin Dec 19, 2020
e6851ab
<feat>nginx 1.21
fraoustin Feb 19, 2022
f6d2c10
修复 htpasswd 在低linux内核版本的bug
zctmdc Jun 9, 2022
8d14ec9
修复 htpasswd 明文密码不可用bug
zctmdc Jun 9, 2022
6c31b12
UPDATE DOCKERFILE
zctmdc Jun 19, 2022
43fcd3e
add description
zctmdc Jun 19, 2022
8e13187
Merge pull request #6 from zctmdc/master
fraoustin Jun 19, 2022
deef012
add docker-compose.yaml
zctmdc Jun 19, 2022
bed5ad9
add china - docker.cn
zctmdc Jun 19, 2022
63b3695
add docker-compose-CN.yaml for china
zctmdc Jun 19, 2022
571a583
build don't use remote
zctmdc Jun 19, 2022
84a9f59
mor deamo
zctmdc Jun 19, 2022
b29d168
<feat> new version and nginx 1.23
fraoustin Jul 1, 2022
bb40fa0
Merge branch 'fraoustin:master' into master
zctmdc Aug 12, 2022
f26f790
add: push to upstream
zctmdc Aug 12, 2022
cfb9125
add: add remote and push to upstream when downstream push
zctmdc Aug 12, 2022
b535d07
Create docker-publish.yml
zctmdc Aug 12, 2022
884f758
set latest tag for master branch
zctmdc Aug 12, 2022
13602da
lf to crlf
zctmdc Aug 12, 2022
35955c1
Update docker-publish.yml
zctmdc Aug 12, 2022
b0ed668
why 0755 not working ?
zctmdc Aug 12, 2022
ffd2b99
show more log
zctmdc Aug 12, 2022
1ef8464
chmod -R g+ws .
zctmdc Aug 12, 2022
ecc1791
chmod and chgrp when addrepos
zctmdc Aug 12, 2022
7890af6
use cache
zctmdc Aug 12, 2022
68ca015
change cache name ref
zctmdc Aug 12, 2022
2288669
CRLF to LF
zctmdc Aug 12, 2022
321c015
Merge branch 'master' into develop
zctmdc Aug 12, 2022
a3092c4
Merge branch 'master' into develop
zctmdc Aug 12, 2022
e973cd6
rm docker-compose-CN
zctmdc Aug 12, 2022
a1b8943
Merge branch 'master' of https://github.com/zctmdc/gitweb
zctmdc Aug 12, 2022
2f45f34
add action "develop"
zctmdc Aug 12, 2022
d675222
Setting base url via Docker
zctmdc Aug 12, 2022
101e89c
hand tag for other branch
zctmdc Aug 12, 2022
b882df5
why https://github.com/Mars-Sea/phddns-docker is working
zctmdc Aug 12, 2022
0f9cc08
CRLF to LF
zctmdc Aug 12, 2022
351ce27
re creat it
zctmdc Aug 12, 2022
7e18184
update
zctmdc Aug 12, 2022
18fef60
delete CN
zctmdc Aug 12, 2022
e6eed0c
Delete docker-publish.yml
zctmdc Aug 12, 2022
c8e18b7
Create docker-publish.yml
zctmdc Aug 12, 2022
ae6f045
update
zctmdc Aug 12, 2022
802964a
Merge branch 'master' into develop
zctmdc Aug 12, 2022
5f47fa0
hand other branch
zctmdc Aug 12, 2022
e6cf569
other branch
zctmdc Aug 13, 2022
97e3889
added syntax highlighting feature
rohm1 Aug 27, 2022
2db1cfe
document new GITHIGHLIGHT option
rohm1 Aug 27, 2022
7cf808a
try build arm
zctmdc Sep 4, 2022
a653ea1
add platforms
zctmdc Sep 4, 2022
748a358
change platforms
zctmdc Sep 4, 2022
6a8998c
use nginx:latest
zctmdc Sep 4, 2022
5dab073
Merge branch 'master' into develop
zctmdc Sep 4, 2022
9e7d479
sync nginx platforms
zctmdc Sep 4, 2022
386350d
Merge branch 'pr/9' into develop
zctmdc Sep 4, 2022
8d3cf0b
>Format Document
zctmdc Sep 4, 2022
3e4ddaa
>inline_html-allowed_elements: kbd
zctmdc Sep 4, 2022
077f735
pr提交编译不通过问题
zctmdc Nov 3, 2022
f5e4efd
uypdate cosign-release: "v1.13.1"
zctmdc Nov 3, 2022
6755319
use github action auto test
zctmdc Nov 3, 2022
f7ac8db
修复自动测试中出现的一些问题
zctmdc Nov 3, 2022
11a0f7d
pr提交编译不通过问题
zctmdc Nov 3, 2022
09a1964
pr提交编译不通过问题: IMAGE_NAME
zctmdc Nov 3, 2022
d096ae1
fixbug: pr提交编译不通过问题: test3
zctmdc Nov 3, 2022
c081329
fixbug: pr提交编译不通过问题: test
zctmdc Nov 3, 2022
80a8511
fixbug: pr提交编译不通过问题: test
zctmdc Nov 3, 2022
afa49ff
set -x
zctmdc Nov 3, 2022
b6915ff
fixbug: add remote -
zctmdc Nov 3, 2022
9aed30c
fixbug: remote not https
zctmdc Nov 3, 2022
e780542
Merge branch 'master' into develop
zctmdc Nov 3, 2022
5940307
fixbug: pr提交编译不通过问题: test
zctmdc Nov 4, 2022
c59e16a
test tag
zctmdc Nov 4, 2022
c6cec91
bug
zctmdc Nov 4, 2022
800b574
bug
zctmdc Nov 4, 2022
82e3228
formate
zctmdc Nov 4, 2022
3dce3a6
some platforms build faild
zctmdc Nov 4, 2022
142b5b9
change nginx to stable
zctmdc Nov 4, 2022
28b89fd
build no-cache: true
zctmdc Nov 4, 2022
3ad433e
why can't build pass
zctmdc Nov 4, 2022
70a9034
use nginx :1.23
zctmdc Nov 4, 2022
3856642
use build-push-action@v2
zctmdc Nov 4, 2022
25d26bd
Who broke it
zctmdc Nov 4, 2022
83ac41d
action v
zctmdc Nov 4, 2022
5277857
install bash
zctmdc Nov 4, 2022
193dd08
step apt-get
zctmdc Nov 4, 2022
a9cc09c
DEBIAN_FRONTEND=noninteractive
zctmdc Nov 4, 2022
1e3f564
local build test pass
zctmdc Nov 4, 2022
0651d0f
update Dockerfile.CN
zctmdc Nov 4, 2022
c28fc1d
不需要的 set -x
zctmdc Nov 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: ["master", "develop", "patch-*"]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
branches: ["master", "develop", "patch-*"]

env:
# Use docker.io for Docker Hub if empty
# REGISTRY: ghcr.io
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: ${{ github.event_name != 'pull_request' }}
uses: sigstore/cosign-installer@main
with:
cosign-release: "v1.13.1"

# You may pin to the exact commit or the version.
# uses: docker/setup-qemu-action@v2
- name: Set up QEMU
if: ${{ false }} # do not need
uses: docker/setup-qemu-action@v2

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}

- name: Build and export to Docker
uses: docker/build-push-action@v3
with:
context: .
load: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test
# cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
# cache-to: type=inline

- name: Test
run: |
docker compose -f ./docker-compose.test.yaml config
docker compose -f ./docker-compose.test.yaml up -d
sleep 10
docker exec -t gitweb-test3 chmod +x /opt/gitweb/test/load.sh
docker exec -t gitweb-test3 /opt/gitweb/test/load.sh

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
if: ${{ github.event_name != 'pull_request' }}
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
# platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/arm/v7,linux/arm/v5
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
no-cache: true
# cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
# cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"markdownlint.config": {
"default": true,
"MD033": {
"allowed_elements": ["kbd"]
}
}
}
54 changes: 38 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
FROM nginx:1.13
LABEL maintainer "fraoustin@gmail.com"
FROM nginx:stable

LABEL maintainer "fraoustin@gmail.com"
# RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
# RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
COPY ./src/default.conf /etc/nginx/conf.d/default.conf

COPY ./src/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY ./src/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENV SET_CONTAINER_TIMEZONE false
ENV CONTAINER_TIMEZONE ""

RUN apt-get update && apt-get install -y \
apache2-utils \
fcgiwrap \
git \
git-core \
gitweb \
highlight \
libcgi-pm-perl \
spawn-fcgi \
&& rm -rf /var/lib/apt/lists/*
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update
RUN apt-get -qq install -y \
bash \
apache2-utils \
fcgiwrap \
git \
git-core \
gitweb \
highlight \
libcgi-pm-perl \
mime-support \
spawn-fcgi
RUN apt-get autoclean
RUN rm -rf /var/lib/apt/lists/*

# manage user load fcgiwrap
RUN sed -i "s/www-data/nginx/g" /etc/init.d/fcgiwrap
Expand All @@ -42,15 +48,31 @@ RUN chmod +x /usr/bin/rmauth
# manage default value
ENV GITUSER gituser
ENV GITPASSWORD gitpassword
ENV GITHIGHLIGHT 0

# add ihm mdl
ENV IHM no-mdl
COPY ./src/ihm /mdl-ihm
RUN cp /usr/share/gitweb/static/gitweb.css /usr/share/gitweb/static/gitweb.css.original
RUN mkdir /usr/share/gitweb/ihm

VOLUME /var/lib/git
# force push to upstream
WORKDIR /opt/gitweb/
COPY ./src/hooks/post-receive /opt/gitweb/post-receive
RUN chmod +x /opt/gitweb/post-receive
ENV FORCEPUSH ''

# Setting base url via Docker
ENV my_uri /

VOLUME /opt/gitweb/remote/

VOLUME /var/lib/git/

WORKDIR /var/lib/git/

EXPOSE 80

ENTRYPOINT ["/entrypoint.sh"]

CMD ["app"]
81 changes: 81 additions & 0 deletions Dockerfile.CN
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
FROM nginx:stable

LABEL maintainer "fraoustin@gmail.com"

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list

COPY ./src/default.conf /etc/nginx/conf.d/default.conf

COPY ./src/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENV SET_CONTAINER_TIMEZONE false
ENV CONTAINER_TIMEZONE ''
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update
RUN apt-get -qq install -y \
bash \
apache2-utils \
fcgiwrap \
git \
git-core \
gitweb \
highlight \
libcgi-pm-perl \
mime-support \
spawn-fcgi

RUN apt-get autoclean
RUN rm -rf /var/lib/apt/lists/*

# manage user load fcgiwrap
RUN sed -i "s/www-data/nginx/g" /etc/init.d/fcgiwrap

# manage start container
RUN mkdir /usr/share/gitweb/docker-entrypoint.pre
RUN mkdir /usr/share/gitweb/docker-entrypoint.post
COPY ./src/00_init.sh /usr/share/gitweb/docker-entrypoint.pre/00_init.sh
RUN chmod +x -R /usr/share/gitweb/docker-entrypoint.pre

# add cmd gitweb
COPY ./src/cmd/addrepos.sh /usr/bin/addrepos
COPY ./src/cmd/addauth.sh /usr/bin/addauth
COPY ./src/cmd/rmrepos.sh /usr/bin/rmrepos
COPY ./src/cmd/rmauth.sh /usr/bin/rmauth
RUN chmod +x /usr/bin/addrepos
RUN chmod +x /usr/bin/addauth
RUN chmod +x /usr/bin/rmrepos
RUN chmod +x /usr/bin/rmauth

# manage default value
ENV GITUSER gituser
ENV GITPASSWORD gitpassword
ENV GITHIGHLIGHT 0

# add ihm mdl
ENV IHM no-mdl
COPY ./src/ihm /mdl-ihm
RUN cp /usr/share/gitweb/static/gitweb.css /usr/share/gitweb/static/gitweb.css.original
RUN mkdir /usr/share/gitweb/ihm

# force push to upstream
WORKDIR /opt/gitweb/
COPY ./src/hooks/post-receive /opt/gitweb/post-receive
RUN chmod +x /opt/gitweb/post-receive
ENV FORCEPUSH ''

# Setting base url via Docker
ENV my_uri /

VOLUME /opt/gitweb/remote/

VOLUME /var/lib/git/

WORKDIR /var/lib/git/

EXPOSE 80

ENTRYPOINT ["/entrypoint.sh"]

CMD ["app"]
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载