diff --git a/.changeset/config.json b/.changeset/config.json index f71d2e8..6f326f7 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,7 +7,7 @@ "access": "restricted", "baseBranch": "canary", "updateInternalDependencies": "patch", - "ignore": ["web"], + "ignore": [], "privatePackages": { "version": true, "tag": true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 003af50..ab8c080 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,8 @@ jobs: - name: Build & Publish uses: docker/build-push-action@v5 with: + cache-from: type=gha + cache-to: type=gha,mode=max context: . file: ./Dockerfile push: ${{ github.event_name != 'pull_request' }} diff --git a/Dockerfile b/Dockerfile index f48565c..4d2fdbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ RUN apk update \ && rm -rf /var/cache/apk/* FROM node AS build +WORKDIR /app ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable @@ -23,8 +24,7 @@ COPY web . RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile \ && NODE_ENV=production pnpm build \ && pnpm prune --prod \ - && mv node_modules /tmp/node_modules \ - && mv build /tmp/build \ + && cp -R node_modules build package.json /tmp \ && rm -rf ./* FROM node diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index ecc8928..b810034 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,6 +1,6 @@ services: wireadmin: - image: wireadmin + image: ghcr.io/wireadmin/wireadmin build: context: . dockerfile: Dockerfile-Dev diff --git a/docker-compose.yml b/docker-compose.yml index beec165..f9a55b0 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: # You can use `openssl rand -base64 8` to generate a secure password - ADMIN_PASSWORD=super-secret-password - image: wireadmin/wireadmin + image: ghcr.io/wireadmin/wireadmin container_name: wireadmin restart: unless-stopped volumes: diff --git a/package.json b/package.json index e817fbe..94f6c82 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "packageManager": "pnpm@8.15.0", "scripts": { "dev": "docker compose -f docker-compose.yml -f docker-compose.dev.yml up --force-recreate", - "dev:image": "docker buildx build --tag wireadmin -f Dockerfile-Dev .", - "build": "docker buildx build --tag wireadmin .", + "dev:image": "docker buildx build --tag ghcr.io/wireadmin/wireadmin -f Dockerfile-Dev .", + "build": "docker buildx build --tag ghcr.io/wireadmin/wireadmin .", "start": "docker compose -f docker-compose.yml up --force-recreate", "format": "prettier --write .", "format:check": "prettier --check . ",