enable docker action to see how it goes

This commit is contained in:
Aine 2024-09-03 15:50:11 +03:00
parent c9a3294852
commit 1967546ae4
No known key found for this signature in database
GPG key ID: 34969C908CCA2804
3 changed files with 32 additions and 53 deletions

View file

@ -4,7 +4,7 @@ on:
branches: [ "main" ] branches: [ "main" ]
env: env:
upstream_version: v0.10.3 upstream_version: v0.10.3
etke_version: etke6 etke_version: etke7
bunny_version: v0.1.0 bunny_version: v0.1.0
base_path: ./ base_path: ./
permissions: permissions:
@ -46,34 +46,32 @@ jobs:
with: with:
name: dist-${{ env.upstream_version }}-${{ env.etke_version }} name: dist-${{ env.upstream_version }}-${{ env.etke_version }}
path: dist/ path: dist/
- name: Debug - name: Set up Docker Buildx
run: ls -lah dist/ uses: docker/setup-buildx-action@v1
# - name: Set up Docker Buildx - name: Login to ghcr.io
# uses: docker/setup-buildx-action@v1 uses: docker/login-action@v3
# - name: Login to ghcr.io with:
# uses: docker/login-action@v3 registry: ghcr.io
# with: username: ${{ github.actor }}
# registry: ghcr.io password: ${{ secrets.GITHUB_TOKEN }}
# username: ${{ github.actor }} - name: Extract metadata (tags, labels) for Docker
# password: ${{ secrets.GITHUB_TOKEN }} id: meta
# - name: Extract metadata (tags, labels) for Docker uses: docker/metadata-action@v5
# id: meta with:
# uses: docker/metadata-action@v5 images: |
# with: ghcr.io/${{ github.repository }}
# images: | registry.etke.cc/${{ github.repository }}
# ghcr.io/${{ github.repository }} tags: |
# registry.etke.cc/${{ github.repository }} type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
# tags: | type=raw,value=${{ env.upstream_version }}-${{ env.etke_version }},enable=${{ github.ref_name == 'main' }}
# type=raw,value=latest,enable=${{ github.ref_name == 'main' }} - name: Build and push
# type=raw,value=${{ env.upstream_version }}-${{ env.etke_version }},enable=${{ github.ref_name == 'main' }} uses: docker/build-push-action@v6
# - name: Build and push with:
# uses: docker/build-push-action@v6 platforms: linux/amd64,linux/arm64
# with: context: .
# platforms: linux/amd64,linux/arm64 push: true
# context: . tags: ${{ steps.meta.outputs.tags }}
# push: true labels: ${{ steps.meta.outputs.labels }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# #
# build-deploy: # build-deploy:
# name: Build and Release # name: Build and Release

View file

@ -1,26 +1,5 @@
# Builder FROM ghcr.io/static-web-server/static-web-server:2
FROM node:lts as builder
LABEL org.opencontainers.image.url=https://github.com/etkecc/synapse-admin org.opencontainers.image.source=https://github.com/etkecc/synapse-admin
# Base path for synapse admin
ARG BASE_PATH=./
WORKDIR /src ENV SERVER_ROOT=/app
# Copy .yarn directory to the working directory (must be on a separate line!) COPY ./dist /app
# Use https://docs.docker.com/engine/reference/builder/#copy---parents when available
COPY .yarn .yarn
COPY package.json .yarnrc.yml yarn.lock ./
# Disable telemetry and install packages
RUN yarn config set enableTelemetry 0 && yarn install --immutable --network-timeout=300000
COPY . /src
RUN yarn build --base=$BASE_PATH
# App
FROM nginx:stable-alpine
COPY --from=builder /src/dist /app
RUN rm -rf /usr/share/nginx/html \
&& ln -s /app /usr/share/nginx/html

View file

@ -29,6 +29,8 @@ The following changes are already implemented:
* [Add ability to toggle whether to show locked users](https://github.com/Awesome-Technologies/synapse-admin/pull/573) * [Add ability to toggle whether to show locked users](https://github.com/Awesome-Technologies/synapse-admin/pull/573)
* [Fix user's display name in header on user's page](https://github.com/etkecc/synapse-admin/pull/9) * [Fix user's display name in header on user's page](https://github.com/etkecc/synapse-admin/pull/9)
* [Fix footer overlapping content](https://github.com/Awesome-Technologies/synapse-admin/issues/574) * [Fix footer overlapping content](https://github.com/Awesome-Technologies/synapse-admin/issues/574)
* Switch from nginx to [SWS](https://static-web-server.net/) for serving the app, reducing the size of the Docker image
by 340%
_the list will be updated as new changes are added_ _the list will be updated as new changes are added_