-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from wutong-paas/noauth
noauth -> master
- Loading branch information
Showing
13 changed files
with
220 additions
and
217 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
* | ||
!docker/* | ||
!filebrowser | ||
# * | ||
# !docker/* | ||
# !filebrowser |
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,8 @@ | ||
{ | ||
"port": 8080, | ||
"baseURL": "", | ||
"address": "", | ||
"log": "stdout", | ||
"database": "/Users/dp/temp/filebrowser.db", | ||
"root": "/Users/dp/temp/filebrowser" | ||
} |
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,53 @@ | ||
name: commit-ci | ||
|
||
env: | ||
TITLE: filebrowser | ||
BASE_VERSION: latest | ||
|
||
on: | ||
push: | ||
branches: [noauth] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# - name: Set ENV | ||
# run: | | ||
# echo "VERSION=${BASE_VERSION}-beta-${GITHUB_SHA::7}" >> $GITHUB_ENV | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to myhuaweicloud-swr | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ secrets.DOMESTIC_DOCKER_SERVER }} | ||
username: ${{ secrets.DOMESTIC_DOCKER_USERNAME }} | ||
password: ${{ secrets.DOMESTIC_DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
file: Dockerfile.multiarch | ||
push: true | ||
tags: ${{ secrets.DOMESTIC_DOCKER_SERVER }}/wutong/${{ env.TITLE }}:${{ env.BASE_VERSION }} | ||
|
||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} | ||
|
||
# - name: Deploy to dev cluster | ||
# id: k8s_deploy | ||
# uses: actions-hub/kubectl@master | ||
# env: | ||
# KUBE_CONFIG: ${{ secrets.DEV_KUBE_CONFIG }} | ||
# with: | ||
# args: set image deployment/${{ env.TITLE }} -n wt-system operator=${{ secrets.DOMESTIC_DOCKER_SERVER }}/wutong/${{ env.TITLE }}:${{ env.BASE_VERSION }} |
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
# Build the manager binary | ||
FROM --platform=$TARGETPLATFORM golang:1.18 as builder | ||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
ENV GOPROXY=https://goproxy.cn,direct | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY . . | ||
|
||
# Build | ||
ARG TARGETOS TARGETARCH TARGETPLATFORM | ||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GO111MODULE=on go build -a -o filebrowser main.go | ||
|
||
FROM --platform=$TARGETPLATFORM alpine:latest AS final | ||
RUN apk --update add ca-certificates \ | ||
mailcap \ | ||
curl | ||
|
||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \ | ||
CMD curl -f http://localhost/health || exit 1 | ||
|
||
VOLUME /srv | ||
EXPOSE 80 | ||
|
||
COPY docker_config.json /.filebrowser.json | ||
COPY --from=builder /workspace/filebrowser /filebrowser | ||
|
||
CMD ["/filebrowser"] |
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.