Skip to content

Commit

Permalink
Adjust judger folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
slhmy committed Sep 14, 2024
1 parent e86526f commit c11ec9b
Show file tree
Hide file tree
Showing 29 changed files with 10 additions and 71 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target/
Cargo.lock
scripts/thirdparty/
override.env
override.env
problem-packages/
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"serve"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/judger/workdirs/development",
"cwd": "${workspaceFolder}/judger/",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ RUN curl https://rclone.org/install.sh | bash

RUN mkdir /workdir
RUN mkdir /workdir/problem-package
COPY judger/workdirs/docker/ /workdir
COPY judger/.env /workdir/.env
COPY judger/rclone.conf /workdir/rclone.conf
RUN sed -i 's/127.0.0.1/host.docker.internal/g' /workdir/rclone.conf

WORKDIR /workdir
ENV RUST_LOG=DEBUG
ENV PLATFORM_URI=http://host.docker.internal:8080/
ENV ENABLE_RCLONE=true
EXPOSE 8000
CMD [ "judger", "serve" ]
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Description: This file is an example of the override.env file.
# You can copy this file to override.env and modify the values to override the default values.

# In this example, we enable rclone and set the problem package path to rclone-problem-package.
ENABLE_RCLONE=true
PROBLEM_PACKAGE_PATH=rclone-problem-package
# In this example, we enable rclone
ENABLE_RCLONE=true
File renamed without changes.
2 changes: 1 addition & 1 deletion judger/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct JudgerOpt {
#[structopt(long, default_value = "oj-lab-problem-package")]
pub problem_package_bucket: String,
/// Where to store problem package
#[structopt(env = "PROBLEM_PACKAGE_PATH", default_value = "problem-package")]
#[structopt(env = "PROBLEM_PACKAGE_PATH", default_value = "problem-packages")]
pub problem_package_dir: PathBuf,
}

Expand Down
1 change: 0 additions & 1 deletion judger/workdirs/development/.gitignore

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions judger/workdirs/docker/problem-package/hello-world/ans.cpp

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 0 additions & 13 deletions judger/workdirs/docker/problem-package/hello-world/problem.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions judger/workdirs/docker/rclone.conf

This file was deleted.

0 comments on commit c11ec9b

Please sign in to comment.