Fork
Signed-off-by: AKP <tom@tdpain.net>
This commit is contained in:
parent
c7b2172869
commit
1d325e15d3
13 changed files with 4 additions and 462 deletions
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
|
@ -1,7 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
18
.github/stale.yml
vendored
18
.github/stale.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
- keep-alive
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
any activity for the last 30 days. It will be closed if no further activity
|
||||
occurs during the next 7 days. Thank you for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
107
.github/workflows/master.yml
vendored
107
.github/workflows/master.yml
vendored
|
@ -1,107 +0,0 @@
|
|||
name: "master"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up CI Image Metadata
|
||||
id: docker_meta_ci
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: solidnerd/bookstack-dev
|
||||
tag-sha: true
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Build Image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: false
|
||||
tags: |
|
||||
${{ steps.docker_meta_ci.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_ci.outputs.labels }}
|
||||
cache-from: type=registry,ref=solidnerd/bookstack-dev:master
|
||||
outputs: type=docker,dest=/tmp/image-bookstack.tar
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: image-bookstack-master
|
||||
path: /tmp/image-bookstack.tar
|
||||
if-no-files-found: warn
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: image-bookstack-master
|
||||
path: /tmp
|
||||
- name: Load Docker image
|
||||
run: |
|
||||
docker load --input /tmp/image-bookstack.tar
|
||||
docker image ls -a
|
||||
push:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: e2e
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Docker Hub Image Metadata
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: solidnerd/bookstack,ghcr.io/solidnerd/docker-bookstack
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
{{major}}.{{minor}}
|
||||
{{major}}.{{minor}}.{{patch}}
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: image-bookstack-master
|
||||
path: /tmp
|
||||
if-no-files-found: warn
|
||||
- name: Load Docker image
|
||||
run: |
|
||||
docker load --input /tmp/image-bookstack.tar
|
||||
docker image ls -a
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
|
||||
cache-to: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
|
58
.github/workflows/pr.yml
vendored
58
.github/workflows/pr.yml
vendored
|
@ -1,58 +0,0 @@
|
|||
name: "PR"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Docker meta ci
|
||||
id: docker_meta_ci
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: solidnerd/bookstack-dev
|
||||
tag-sha: true
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Build and push Dev
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
${{ steps.docker_meta_ci.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_ci.outputs.labels }}
|
||||
cache-from: type=registry,ref=solidnerd/bookstack-dev:master
|
||||
cache-to: type=inline
|
||||
outputs: type=docker,dest=/tmp/image-bookstack.tar
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: image-bookstack
|
||||
path: /tmp/image-bookstack.tar
|
||||
if-no-files-found: warn
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: image-bookstack
|
||||
path: /tmp
|
||||
if-no-files-found: warn
|
||||
- name: Load Docker image
|
||||
run: |
|
||||
docker load --input /tmp/image-bookstack.tar
|
||||
docker image ls -a
|
||||
- name: Execute End-to-End Test
|
||||
run: make e2e
|
128
.github/workflows/release.yml
vendored
128
.github/workflows/release.yml
vendored
|
@ -1,128 +0,0 @@
|
|||
name: release
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- '*' # Push events to matching v*, i.e. v1.0, v0.4.4
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up CI Image Metadata
|
||||
id: docker_meta_ci
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: solidnerd/bookstack-dev
|
||||
tag-sha: true
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Build and push Dev
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: false
|
||||
tags: |
|
||||
${{ steps.docker_meta_ci.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_ci.outputs.labels }}
|
||||
cache-from: type=registry,ref=solidnerd/bookstack-dev:master
|
||||
outputs: type=docker,dest=/tmp/image-bookstack.tar
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: image-bookstack-master
|
||||
path: /tmp/image-bookstack.tar
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: image-bookstack-master
|
||||
path: /tmp
|
||||
- name: Load Docker image
|
||||
run: |
|
||||
docker load --input /tmp/image-bookstack.tar
|
||||
docker image ls -a
|
||||
push:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: e2e
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Docker Hub Image Metadata
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: solidnerd/bookstack,ghcr.io/solidnerd/docker-bookstack
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
{{major}}.{{minor}}
|
||||
{{major}}.{{minor}}.{{patch}}
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: image-bookstack-master
|
||||
path: /tmp
|
||||
- name: Load Docker image
|
||||
run: |
|
||||
docker load --input /tmp/image-bookstack.tar
|
||||
docker image ls -a
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
- name: Build and Push master
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
|
||||
cache-to: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
|
||||
create-release:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: push
|
||||
steps:
|
||||
# To use this repository's private action, you must check out the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Generate changelog
|
||||
id: changelog
|
||||
uses: metcalfc/changelog-generator@v3.0.0
|
||||
with:
|
||||
myToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1.1.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
body: ${{ steps.changelog.outputs.changelog }}
|
||||
draft: false
|
||||
prerelease: false
|
|
@ -1,27 +0,0 @@
|
|||
stages:
|
||||
- build
|
||||
- test
|
||||
- image
|
||||
build:
|
||||
stage: build
|
||||
before_script:
|
||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
||||
script:
|
||||
- docker build -t $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME .
|
||||
- docker push $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
|
||||
- docker rmi $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
|
||||
|
||||
release:
|
||||
stage: image
|
||||
before_script:
|
||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
||||
script:
|
||||
- docker pull $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
|
||||
- docker tag $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME $CI_REGISTRY_IMAGE:$(cat VERSION)
|
||||
- docker push $CI_REGISTRY_IMAGE:$(cat VERSION)
|
||||
- docker rmi $CI_REGISTRY_IMAGE:$(cat VERSION)
|
||||
- docker tag $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME $CI_REGISTRY_IMAGE:latest
|
||||
- docker push $CI_REGISTRY_IMAGE:latest
|
||||
- docker rmi $CI_REGISTRY_IMAGE:latest
|
||||
only:
|
||||
- master
|
|
@ -89,8 +89,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
|
|||
org.label-schema.docker.dockerfile="/Dockerfile" \
|
||||
org.label-schema.license="MIT" \
|
||||
org.label-schema.name="bookstack" \
|
||||
org.label-schema.vendor="solidnerd" \
|
||||
org.label-schema.url="https://github.com/solidnerd/docker-bookstack/" \
|
||||
org.label-schema.vendor="codemicro" \
|
||||
org.label-schema.url="https://github.com/codemicro/docker-bookstack/" \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vcs-url="https://github.com/solidnerd/docker-bookstack.git" \
|
||||
org.label-schema.vcs-url="https://github.com/codemicro/docker-bookstack.git" \
|
||||
org.label-schema.vcs-type="Git"
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Niclas Mietz <hi@solidnerd.dev>
|
||||
Copyright (c) 2020 Niclas Mietz <hi@solidnerd.dev>, 2022 codemicro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
37
Makefile
37
Makefile
|
@ -1,37 +0,0 @@
|
|||
DOCKER_RELEASE_REG=solidnerd
|
||||
DOCKER_IMAGE=bookstack
|
||||
DOCKER_IMAGE_DEV=${DOCKER_IMAGE}-dev
|
||||
DOCKER_INTERNAL_TAG := "sha-$(shell git rev-parse --short HEAD)"
|
||||
DOCKER_RELEASE_TAG := $(shell git describe)
|
||||
BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
VCS_URL := https://github.com/solidnerd/docker-bookstack
|
||||
|
||||
.PHONY: build push pull release
|
||||
|
||||
build:
|
||||
docker image build . \
|
||||
-t $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE_DEV):$(DOCKER_INTERNAL_TAG) \
|
||||
--build-arg VCS_REF=$(DOCKER_INTERNAL_TAG) \
|
||||
--build-arg BUILD_DATE=$(BUILD_DATE) \
|
||||
--build-arg VCS_URL=$(VCS_URL)
|
||||
|
||||
push-dev:
|
||||
docker push $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE_DEV):$(DOCKER_INTERNAL_TAG)
|
||||
|
||||
pull:
|
||||
docker pull $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE_DEV):$(DOCKER_INTERNAL_TAG)
|
||||
|
||||
release:
|
||||
docker tag $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE_DEV):$(DOCKER_INTERNAL_TAG) $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE):$(DOCKER_RELEASE_TAG)
|
||||
docker tag $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE_DEV):$(DOCKER_INTERNAL_TAG) $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE):latest
|
||||
|
||||
push-release:
|
||||
docker push $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE):$(DOCKER_RELEASE_TAG)
|
||||
docker push $(DOCKER_RELEASE_REG)/$(DOCKER_IMAGE):latest
|
||||
|
||||
|
||||
e2e:
|
||||
@BOOKSTACK_IMAGE="$(DOCKER_RELEASE_REG)/${DOCKER_IMAGE_DEV}:${DOCKER_INTERNAL_TAG}" docker-compose -f docker-compose.test.yml up -d
|
||||
@BOOKSTACK_IMAGE="$(DOCKER_RELEASE_REG)/${DOCKER_IMAGE_DEV}:${DOCKER_INTERNAL_TAG}" docker-compose -f docker-compose.test.yml run --rm sut
|
||||
@BOOKSTACK_IMAGE="$(DOCKER_RELEASE_REG)/${DOCKER_IMAGE_DEV}:${DOCKER_INTERNAL_TAG}" docker-compose -f docker-compose.test.yml down -v
|
||||
|
1
VERSION
1
VERSION
|
@ -1 +0,0 @@
|
|||
22.04
|
|
@ -1,37 +0,0 @@
|
|||
version: '2.4'
|
||||
services:
|
||||
sut:
|
||||
image: appropriate/curl
|
||||
command: ["--ipv4","--retry", "15","--retry-delay","5","--retry-connrefused","http://bookstack:8080/login"]
|
||||
depends_on:
|
||||
- bookstack
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=secret
|
||||
- MYSQL_DATABASE=bookstack
|
||||
- MYSQL_USER=bookstack
|
||||
- MYSQL_PASSWORD=secret
|
||||
volumes:
|
||||
- mysql-data:/var/lib/mysql
|
||||
|
||||
bookstack:
|
||||
image: ${BOOKSTACK_IMAGE:-solidnerd/bookstack}
|
||||
depends_on:
|
||||
- mysql
|
||||
environment:
|
||||
- APP_URL=http://localhost:${DEV_PORT:-8080}
|
||||
- DB_HOST=mysql:3306
|
||||
- DB_DATABASE=bookstack
|
||||
- DB_USERNAME=bookstack
|
||||
- DB_PASSWORD=secret
|
||||
volumes:
|
||||
- uploads:/var/www/bookstack/public/uploads
|
||||
- storage-uploads:/var/www/bookstack/storage/uploads
|
||||
ports:
|
||||
- "8080:80"
|
||||
|
||||
volumes:
|
||||
mysql-data:
|
||||
uploads:
|
||||
storage-uploads:
|
|
@ -1,33 +0,0 @@
|
|||
version: '2'
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=secret
|
||||
- MYSQL_DATABASE=bookstack
|
||||
- MYSQL_USER=bookstack
|
||||
- MYSQL_PASSWORD=secret
|
||||
volumes:
|
||||
- mysql-data:/var/lib/mysql
|
||||
|
||||
bookstack:
|
||||
image: solidnerd/bookstack:22.04.02
|
||||
depends_on:
|
||||
- mysql
|
||||
environment:
|
||||
- DB_HOST=mysql:3306
|
||||
- DB_DATABASE=bookstack
|
||||
- DB_USERNAME=bookstack
|
||||
- DB_PASSWORD=secret
|
||||
#set the APP_ to the URL of bookstack without without a trailing slash APP_URL=https://example.com
|
||||
- APP_URL=http://example.com
|
||||
volumes:
|
||||
- uploads:/var/www/bookstack/public/uploads
|
||||
- storage-uploads:/var/www/bookstack/storage/uploads
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
||||
volumes:
|
||||
mysql-data:
|
||||
uploads:
|
||||
storage-uploads:
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue