mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 13:39:53 +00:00
nixpacks
This commit is contained in:
parent
f394e34861
commit
eac571934c
29
nixpacks.toml
Normal file
29
nixpacks.toml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
providers = []
|
||||||
|
buildImage = 'ghcr.io/railwayapp/nixpacks:ubuntu-1707782610'
|
||||||
|
|
||||||
|
[variables]
|
||||||
|
CGO_ENABLED = '0'
|
||||||
|
NIXPACKS_METADATA = 'go'
|
||||||
|
PORT = '8090'
|
||||||
|
|
||||||
|
[phases.build]
|
||||||
|
paths = ['/bin','/usr/local/bin']
|
||||||
|
dependsOn = [
|
||||||
|
'install',
|
||||||
|
'setup',
|
||||||
|
]
|
||||||
|
cmds = ['npm --prefix=./ui run build','go build -o out']
|
||||||
|
cacheDirectories = ['/root/.cache/go-build']
|
||||||
|
|
||||||
|
[phases.install]
|
||||||
|
dependsOn = ['setup']
|
||||||
|
cmds = ['go mod download',"npm --prefix=./ui ci"]
|
||||||
|
cacheDirectories = ['/root/.cache/go-build']
|
||||||
|
|
||||||
|
[phases.setup]
|
||||||
|
nixPkgs = ['go','node']
|
||||||
|
nixOverlays = []
|
||||||
|
nixpkgsArchive = '1f13eabcd6f5b00fe9de9575ac52c66a0e887ce6'
|
||||||
|
|
||||||
|
[start]
|
||||||
|
cmd = './out serve --http=0.0.0.0:8090 --dir=/data/pb_data '
|
@ -1,7 +1,9 @@
|
|||||||
import PocketBase from "pocketbase";
|
import PocketBase from "pocketbase";
|
||||||
|
const apiDomain = import.meta.env.VITE_API_DOMAIN;
|
||||||
|
console.log(apiDomain);
|
||||||
let pb: PocketBase;
|
let pb: PocketBase;
|
||||||
export const getPb = () => {
|
export const getPb = () => {
|
||||||
if (pb) return pb;
|
if (pb) return pb;
|
||||||
pb = new PocketBase("http://127.0.0.1:8090");
|
pb = new PocketBase(apiDomain ? apiDomain : "http://127.0.0.1:8090");
|
||||||
return pb;
|
return pb;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user