This commit is contained in:
Shahrad Elahi 2024-05-29 19:19:36 +03:30
parent f605e356ff
commit bd2ddbb08b
No known key found for this signature in database
6 changed files with 9 additions and 7 deletions

View File

@ -7,7 +7,7 @@
"access": "restricted",
"baseBranch": "canary",
"updateInternalDependencies": "patch",
"ignore": ["web"],
"ignore": [],
"privatePackages": {
"version": true,
"tag": true

View File

@ -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' }}

View File

@ -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

View File

@ -1,6 +1,6 @@
services:
wireadmin:
image: wireadmin
image: ghcr.io/wireadmin/wireadmin
build:
context: .
dockerfile: Dockerfile-Dev

View File

@ -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:

View File

@ -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 . ",