mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
w: add hydro.nix (draft)
This commit is contained in:
1 parent
c27c7cdf3c
commit
b35d75cfe8
2 files changed
+33
-4
No files matched your search
@@ -70,8 +70,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
context: ./install/docker/backend
|
context: ./install/docker/backend
|
||||||
tags: |
|
tags: |
|
||||||
docker.pkg.github.com/${{ github.repository }}/web:${{ github.sha }}
|
docker.pkg.github.com/hydro-dev/hydro/web:${{ github.sha }}
|
||||||
docker.pkg.github.com/${{ github.repository }}/web:${{ github.ref }}
|
docker.pkg.github.com/hydro-dev/hydro/web:${{ github.ref }}
|
||||||
judge:
|
judge:
|
||||||
needs: build
|
needs: build
|
||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
@@ -96,5 +96,5 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
context: ./install/docker/judge
|
context: ./install/docker/judge
|
||||||
tags: |
|
tags: |
|
||||||
docker.pkg.github.com/${{ github.repository }}/judge:${{ github.sha }}
|
docker.pkg.github.com/hydro-dev/hydro/judge:${{ github.sha }}
|
||||||
docker.pkg.github.com/${{ github.repository }}/judge:${{ github.ref }}
|
docker.pkg.github.com/hydro-dev/hydro/judge:${{ github.ref }}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> { system = "x86_64-linux"; } }:
|
||||||
|
|
||||||
|
pkgs.dockerTools.buildImage {
|
||||||
|
name = "hydrooj/web";
|
||||||
|
tag = "latest";
|
||||||
|
|
||||||
|
contents = [
|
||||||
|
pkgs.mongodb-4_2
|
||||||
|
pkgs.minio
|
||||||
|
pkgs.nodejs
|
||||||
|
pkgs.yarn
|
||||||
|
];
|
||||||
|
runAsRoot = ''
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
mkdir -p /data/db
|
||||||
|
yarn global add pm2 hydrooj @hydrooj/ui-default @hydrooj/hydrojudge
|
||||||
|
hydrooj addon add @hydrooj/hydrojudge
|
||||||
|
hydrooj addon add @hydrooj/ui-default
|
||||||
|
'';
|
||||||
|
|
||||||
|
config = {
|
||||||
|
WorkingDir = "/data";
|
||||||
|
Volumes = { "/data" = { }; };
|
||||||
|
ExposedPorts = {
|
||||||
|
"8888" = { };
|
||||||
|
};
|
||||||
|
Entrypoint = [ "/entrypoint.sh" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in new issue
Block a user