add build scripts

This commit is contained in:
rubikscraft
2022-02-25 16:41:56 +01:00
parent fe6f5ef757
commit 4e897e9245
9 changed files with 40 additions and 13856 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "imagur-backend",
"private": false,
"version": "1.0.0",
"version": "0.0.0",
"description": "Backend for Imagur",
"license": "GPL-3.0",
"repository": "https://github.com/rubikscraft/Imagur",
@@ -15,8 +15,6 @@
"start:dev": "nest start --watch --exec \"node --experimental-specifier-resolution=node\"",
"start:debug": "nest start --debug --watch --exec \"node --experimental-specifier-resolution=node\"",
"start:prod": "node --experimental-specifier-resolution=node dist/main",
"devdb:start": "podman-compose -f ./dev/docker-compose.yml up -d",
"devdb:stop": "podman-compose -f ./dev/docker-compose.yml down",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
},

View File

@@ -1,7 +1,7 @@
{
"private": false,
"name": "imagur-frontend",
"version": "1.0.0",
"version": "0.0.0",
"description": "Frontend for Imagur",
"license": "GPL-3.0",
"repository": "https://github.com/rubikscraft/Imagur",

View File

@@ -1,8 +1,14 @@
{
"private": true,
"version": "0.1.0",
"workspaces": [
"shared",
"backend",
"frontend"
]
],
"scripts": {
"devdb:start": "podman-compose -f ./dev/docker-compose.yml up -d",
"devdb:stop": "podman-compose -f ./dev/docker-compose.yml down",
"build": "./support/build.sh"
}
}

View File

@@ -1,7 +1,7 @@
{
"private": false,
"name": "imagur-shared",
"version": "1.0.0",
"version": "0.0.0",
"description": "Shared libraries for Imagur",
"license": "GPL-3.0",
"repository": "https://github.com/rubikscraft/Imagur",

20
support/build.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Go to this script
cd "$( dirname "${BASH_SOURCE[0]}" )"
# Read current version from ../package.json
VERSION=$(cat ../package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
echo "Building version $VERSION"
docker build -t "ghcr.io/rubikscraft/imagur:$VERSION" -t "ghcr.io/rubikscraft/imagur:latest" -f ./imagur.Dockerfile ..
echo "Done"
echo "Pushing to ghcr.io"
docker push "ghcr.io/rubikscraft/imagur:$VERSION"
docker push "ghcr.io/rubikscraft/imagur:latest"
echo "Done"

View File

@@ -1,7 +1,7 @@
version: "3"
services:
imagur:
build: .
image: test #ghcr.io/rubikscraft/imagur:latest
container_name: imagur
ports:
- "8080:8080"

13858
yarn.lock

File diff suppressed because it is too large Load Diff