mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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
|
||||
context: ./install/docker/backend
|
||||
tags: |
|
||||
docker.pkg.github.com/${{ github.repository }}/web:${{ github.sha }}
|
||||
docker.pkg.github.com/${{ github.repository }}/web:${{ github.ref }}
|
||||
docker.pkg.github.com/hydro-dev/hydro/web:${{ github.sha }}
|
||||
docker.pkg.github.com/hydro-dev/hydro/web:${{ github.ref }}
|
||||
judge:
|
||||
needs: build
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
@@ -96,5 +96,5 @@ jobs:
|
||||
push: true
|
||||
context: ./install/docker/judge
|
||||
tags: |
|
||||
docker.pkg.github.com/${{ github.repository }}/judge:${{ github.sha }}
|
||||
docker.pkg.github.com/${{ github.repository }}/judge:${{ github.ref }}
|
||||
docker.pkg.github.com/hydro-dev/hydro/judge:${{ github.sha }}
|
||||
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