π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
ci: Move docker build instructions into separate scripts
jamesread79ed89060eb7
diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.ymlindex b6ec927b5..4d089a88c 100644--- a/.github/workflows/build-containers.yml+++ b/.github/workflows/build-containers.yml@@ -15,14 +15,6 @@ jobs:with:fetch-depth: 0- - name: Setup node- uses: actions/setup-node@v4- with:- node-version: '20.17'- cache: 'npm'- cache-dependency-path: |- **/package-lock.json-- name: Login to ghcruses: docker/login-action@v3with:@@ -31,7 +23,7 @@ jobs:password: ${{ github.token }}- name: docker build- run: npm run docker-build+ run: /var/run/docker-build.sh- name: docker tagrun: |diff --git a/package.json b/package.jsonindex efd4a8174..bda70c5e3 100644--- a/package.json+++ b/package.json@@ -20,8 +20,8 @@"prisma-generate": "cd ./libraries/nestjs-libraries/src/database/prisma && npx prisma generate","prisma-db-push": "cd ./libraries/nestjs-libraries/src/database/prisma && npx prisma db push","prisma-reset": "cd ./libraries/nestjs-libraries/src/database/prisma && npx prisma db push --force-reset && npx prisma db push",- "docker-build": "docker rmi localhost/postiz || true && docker build --target dist -t localhost/postiz -f Dockerfile . && docker build --target devcontainer -t localhost/postiz-devcontainer -f Dockerfile .",- "docker-create": "docker kill postiz || true && docker rm postiz || true && docker create --name postiz -p 3000:3000 -p 4200:4200 localhost/postiz",+ "docker-build": "./var/docker/docker-build.sh",+ "docker-create": "./var/docker/docker-create.sh","postinstall": "npm run prisma-generate"},"private": true,diff --git a/var/docker/docker-build.sh b/var/docker/docker-build.shnew file mode 100755index 000000000..bdbc83d85--- /dev/null+++ b/var/docker/docker-build.sh@@ -0,0 +1,5 @@+#!/bin/bash++docker rmi localhost/postiz || true+docker build --target dist -t localhost/postiz -f Dockerfile .+docker build --target devcontainer -t localhost/postiz-devcontainer -f Dockerfile .diff --git a/var/docker/docker-create.sh b/var/docker/docker-create.shnew file mode 100644index 000000000..9b8fda991--- /dev/null+++ b/var/docker/docker-create.sh@@ -0,0 +1,5 @@+#!/usr/bin/env bash++docker kill postiz || true+docker rm postiz || true+docker create --name postiz -p 3000:3000 -p 4200:4200 localhost/postiz