diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..b6220df --- /dev/null +++ b/.env.sample @@ -0,0 +1,41 @@ +## Required variables section ## + +# Host port mappings +WEB_SERVER_PORT=3000 +SSH_SERVER_PORT=2222 + +# Hostname and URL +FQDN=your.domain.com +NEXTAUTH_URL=https://your.domain.com + +# Secrects +NEXTAUTH_SECRET=your-secret +CRONJOB_KEY=your-other-secret + +# UID:GID must match the user and group ID of the host folders and must be > 1000 +# If you want to use a different user than 1001:1001, you must rebuild the image yourself. +UID=1001 +GID=1001 + +# Config and data folders (volume mounts) +# The host folders must be owned by the user with UID and GID specified above +CONFIG_PATH=./config +SSH_PATH=./ssh +SSH_HOST=./ssh_host +BORG_REPOSITORY_PATH=./repos +TMP_PATH=./tmp +LOGS_PATH=./logs + +## Optional variables section ## + +# LAN feature +FQDN_LAN= +SSH_SERVER_PORT_LAN= + +# SMTP server settings +MAIL_SMTP_FROM= +MAIL_SMTP_HOST= +MAIL_SMTP_PORT= +MAIL_SMTP_LOGIN= +MAIL_SMTP_PWD= +MAIL_REJECT_SELFSIGNED_TLS= \ No newline at end of file diff --git a/.github/workflows/docker-image-develop.yml b/.github/workflows/docker-image-develop.yml new file mode 100644 index 0000000..dfce5c6 --- /dev/null +++ b/.github/workflows/docker-image-develop.yml @@ -0,0 +1,29 @@ +name: Build and Push Docker Image for Develop Branch + +on: + push: + branches: + - 'develop' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: borgwarehouse/borgwarehouse:develop diff --git a/.github/workflows/docker-image-latest.yml b/.github/workflows/docker-image-latest.yml index ded2e01..741ef51 100644 --- a/.github/workflows/docker-image-latest.yml +++ b/.github/workflows/docker-image-latest.yml @@ -1,34 +1,29 @@ name: Build and Push Docker Image on: - push: - branches: - - 'main' + push: + branches: + - 'main' jobs: - docker: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - push: true - platforms: linux/amd64,linux/arm64,linux/arm - tags: borgwarehouse/borgwarehouse:latest + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: borgwarehouse/borgwarehouse:latest diff --git a/.github/workflows/docker-image-release.yml b/.github/workflows/docker-image-release.yml index 1e28360..abf21cd 100644 --- a/.github/workflows/docker-image-release.yml +++ b/.github/workflows/docker-image-release.yml @@ -1,38 +1,32 @@ name: Build and Push Docker Image on Release on: - release: - types: - - published + release: + types: + - published jobs: - docker: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Get Release Tag - id: get_release_tag - run: echo "::set-output name=TAG::${{ github.event.release.tag_name }}" - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - push: true - platforms: linux/amd64,linux/arm64 - tags: borgwarehouse/borgwarehouse:${{ steps.get_release_tag.outputs.TAG }} + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get Release Tag + id: get_release_tag + run: echo "::set-output name=TAG::${{ github.event.release.tag_name }}" + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: borgwarehouse/borgwarehouse:${{ steps.get_release_tag.outputs.TAG }} diff --git a/.github/workflows/docker-image-test.yml b/.github/workflows/docker-image-test.yml index 448f45c..91836ad 100644 --- a/.github/workflows/docker-image-test.yml +++ b/.github/workflows/docker-image-test.yml @@ -18,4 +18,4 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build Docker Container run: | - docker buildx build --platform linux/amd64,linux/arm64 -t borgwarehouse:pr-${{ github.event.pull_request.number }} . + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t borgwarehouse:pr-${{ github.event.pull_request.number }} . diff --git a/Components/Repo/QuickCommands/QuickCommands.js b/Components/Repo/QuickCommands/QuickCommands.js index 8685d80..c76a3a7 100644 --- a/Components/Repo/QuickCommands/QuickCommands.js +++ b/Components/Repo/QuickCommands/QuickCommands.js @@ -50,11 +50,13 @@ export default function QuickCommands(props) {
Copied !
) : (
- ssh://{wizardEnv.UNIX_USER}@ - {FQDN}:{SSH_SERVER_PORT}/./ + ssh://{wizardEnv.UNIX_USER}@{FQDN}:{SSH_SERVER_PORT}/./ {props.repositoryName}
)} + + {props.lanCommand &&
LAN
} +