Skip to content

Commit 976494f

Browse files
update readme and production dockerfile
1 parent 7d97c04 commit 976494f

File tree

5 files changed

+15
-56
lines changed

5 files changed

+15
-56
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ A set of email/password with admin privileges will be uploaded to Canvas through
66

77
# Testing Locally
88

9-
## DISCLAIMER: Our executor service can only run on x86_64 architecture. If you are using a different architecture, you will not be able to run the executor locally. However, you can still test the rest of the application.
10-
119
- Install Docker for your operating system. You can find the installation instructions [here](https://docs.docker.com/get-docker/).
1210
- Clone the repository.
1311
- Run `git submodule update --init` to clone the submodules.

deployment/Dockerfile-executor

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# docker build -f deployment/Dockerfile-executor -t peerprep-executor .
44

5-
FROM nixos/nix:2.3.12
5+
FROM opensuse/tumbleweed
66

77
# Environment variables
88

@@ -11,13 +11,17 @@ ENV APP_ROOT /executor
1111
WORKDIR $APP_ROOT
1212
COPY executor .
1313

14-
RUN nix-channel --update
15-
RUN nix-env -iA nixpkgs.shadow nixpkgs.gcc12 nixpkgs.python3Minimal nixpkgs.jdk19_headless
16-
RUN nix-env -if default.nix
14+
RUN groupadd -g 1300 -r peerprep && useradd -g 1300 -u 1500 -r executor
1715

18-
RUN groupadd -g 1300 -r peerprep
19-
RUN useradd -g 1300 -u 1500 -r executor
16+
RUN zypper refresh
17+
RUN zypper install -t pattern -y devel_C_C++
18+
RUN zypper install -y cmake
19+
RUN zypper install -y java-11-openjdk-devel
20+
21+
RUN cmake -DCMAKE_BUILD_TYPE=Release -S . -B ./build
22+
RUN cmake --build ./build --config Release
23+
RUN cp ./build/executor ./executor
2024

2125
EXPOSE 9000
2226

23-
CMD ["executor"]
27+
CMD ["./executor"]

deployment/Dockerfile-executor-local

Lines changed: 0 additions & 27 deletions
This file was deleted.

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ services:
2727
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
2828

2929
executor:
30-
image: ghcr.io/peerprep/peerprep-executor-service:latest
30+
image: peerprep-executor-service
31+
build:
32+
context: .
33+
dockerfile: deployment/Dockerfile-executor
3134
container_name: peerprep-executor-service
3235
restart: always
3336
networks:

executor/default.nix

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)