diff --git a/.gitignore b/.gitignore index a3486f8..5b2af24 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ bin/ __debug_bin** # Ignore override config files -override.* +*override.* !override.example.toml frontend/ diff --git a/Dockerfile b/Dockerfile index c688bc5..011b774 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,12 +11,12 @@ RUN make get-front FROM ubuntu:latest -WORKDIR /platform +WORKDIR /workdir COPY --from=build /workdir/bin/ /usr/local/bin/ -COPY --from=build /workdir/frontend/dist ./frontend_dist +COPY --from=build /workdir/frontend/dist frontend/dist -COPY config.toml ./config.toml +COPY config.toml config.toml ENV OJ_LAB_SERVICE_ENV='production' ENV DATABASE_DSN='user=postgres password=postgres host=host.docker.internal port=5432 dbname=oj_lab sslmode=disable TimeZone=Asia/Shanghai' diff --git a/Makefile b/Makefile index cbcc67a..68324c9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ OS := $(shell uname -s) FRONTEND_DIST_DIR := frontend/dist -FRONTEND_DIST_URL := https://github.com/oj-lab/frontend/releases/download/v0.0.3/dist.zip +FRONTEND_DIST_URL := https://github.com/oj-lab/frontend/releases/download/v0.1.0/dist.zip ICPC_PROBLEM_PACKAGES_DIR := problem-packages/icpc ICPC_PROBLEM_PACKAGES_URL := https://github.com/oj-lab/problem-packages/releases/download/v0.0.1/icpc_problem.zip diff --git a/docker-compose.yml b/docker-compose.yml index ee89a0e..aade9ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,4 +58,15 @@ services: environment: - ENABLE_RCLONE=true ports: - - 8000:8000 \ No newline at end of file + - 8000:8000 + + platform: + image: ghcr.io/oj-lab/platform:main + pull_policy: always + extra_hosts: + - "host.docker.internal:host-gateway" + ports: + - 8080:8080 + volumes: + - ./frontend:/workdir/frontend + - ./override.docker.toml:/workdir/override.toml \ No newline at end of file