diff --git a/.dockerignore b/.dockerignore index 0cbb973..99f4afc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,5 +3,4 @@ node_modules dist dist-ssr -compose.yml -src/config.json \ No newline at end of file +compose.yml \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..20bb30b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +name: docker-ci + +on: + push: + branches: + - "main" + +env: + USER: jordanroher + REPO: starbase-80 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set variables + run: | + VER=$(cat VERSION) + echo "VERSION=$VER" >> $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 Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: true + context: . + file: dockerfile + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 + tags: | + ${{ env.USER }}/${{ env.REPO }}:${{ env.VERSION }} + ${{ env.USER }}/${{ env.REPO }}:latest diff --git a/.gitignore b/.gitignore index 2c1f63f..ff1876d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ node_modules .DS_Store dist dist-ssr -src/config.json public \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 4ac5d26..7b4d62f 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -4,7 +4,7 @@ LOGO=${LOGO//\//\\/} # HTML replacement -sed -i -e 's/HTMLTITLE/'"${TITLE}"'/g' /app/index.html +sed -i -e 's/My Website/'"${TITLE}"'/g' /app/index.html # TypeScript replacement sed -i -e 's/PAGETITLE = "My Website"/PAGETITLE = "'"${TITLE}"'"/g' /app/src/variables.ts diff --git a/dockerfile b/dockerfile index dbfdf65..02c0bcc 100644 --- a/dockerfile +++ b/dockerfile @@ -1,5 +1,14 @@ FROM node:18-alpine +ARG BUILD_DATE + +LABEL \ + maintainer="Jordan Roher " \ + org.opencontainers.image.authors="Jordan Roher " \ + org.opencontainers.image.title="starbase-80" \ + org.opencontainers.image.description="A nice app grid of icons for Docker services" \ + org.opencontainers.image.created=$BUILD_DATE + WORKDIR /app COPY package.json . @@ -18,6 +27,8 @@ ENV CATEGORIES "normal" ENV BGCOLOR "theme(colors.slate.50)" ENV BGCOLORDARK "theme(colors.gray.950)" +COPY version / + EXPOSE 4173 RUN chmod +x /app/docker-entrypoint.sh diff --git a/index.html b/index.html index b89f7e4..424e411 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - HTMLTITLE + My Website
diff --git a/src/config.json b/src/config.json new file mode 100644 index 0000000..2bb665d --- /dev/null +++ b/src/config.json @@ -0,0 +1,26 @@ +[ + { + "category": "Example category", + "services": [ + { + "name": "Check the readme", + "uri": "https://github.com/notclickable-jordan/starbase-80", + "description": "Use your own icons", + "icon": "github" + }, + { + "name": "Bind mount", + "uri": "https://github.com/notclickable-jordan/docker-symphony", + "description": "to /app/src/config.json", + "icon": "docker" + }, + { + "name": "Watch Lower Decks", + "uri": "https://www.paramountplus.com/", + "description": "On Paramount+", + "icon": "mdi-image-filter-hdr", + "iconColor": "blue-500" + } + ] + } +] diff --git a/version b/version new file mode 100644 index 0000000..8cfbc90 --- /dev/null +++ b/version @@ -0,0 +1 @@ +1.1.1 \ No newline at end of file