Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
67 changes: 67 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Docker Image CI

on:
push:
branches: [ "develop" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Check for secrets
id: check_secrets
run: |
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then
echo "::warning::Docker Hub secrets not set. Skipping job."
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
-
name: Checkout
if: steps.check_secrets.outputs.skip == 'false'
uses: actions/checkout@v3
-
name: Cache frontend artifacts
if: steps.check_secrets.outputs.skip == 'false'
id: cache-frontend
uses: actions/cache@v3
with:
path: frontend/dist
key: ${{ runner.os }}-frontend-${{ hashFiles('frontend/yarn.lock', 'frontend/package.json', 'frontend/vite.config.ts', 'frontend/tsconfig.json', 'frontend/src/**') }}
restore-keys: |
${{ runner.os }}-frontend-
-
name: Build Frontend if not cached
if: steps.check_secrets.outputs.skip == 'false' && steps.cache-frontend.outputs.cache-hit != 'true'
run: |
chmod +x scripts/ci/frontend-build
./scripts/ci/frontend-build
-
name: Set up QEMU
if: steps.check_secrets.outputs.skip == 'false'
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
if: steps.check_secrets.outputs.skip == 'false'
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
if: steps.check_secrets.outputs.skip == 'false'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
if: steps.check_secrets.outputs.skip == 'false'
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/nginx-proxy-manager:develop
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 2 additions & 2 deletions backend/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const setupDefaultUser = async () => {

const data = {
is_deleted: 0,
email: email,
email: initialAdminEmail,
name: "Administrator",
nickname: "Admin",
avatar: "",
Expand All @@ -53,7 +53,7 @@ const setupDefaultUser = async () => {
.insert({
user_id: user.id,
type: "password",
secret: password,
secret: initialAdminPassword,
meta: {},
});

Expand Down