Skip to content

Commit 06dee64

Browse files
authored
Merge branch 'dev/user-profile' into dev/seonghyeon
2 parents e514025 + 7dd4222 commit 06dee64

File tree

212 files changed

+13897
-1020
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+13897
-1020
lines changed

.DS_Store

8 KB
Binary file not shown.

.devcontainer/Dockerfile

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04
1+
# [Choice] Python version (https://github.com/microsoft/vscode-dev-containers/tree/main/containers/python-3)
2+
ARG VARIANT=3.8-bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}
24

3-
# Install Node 16
4-
ENV NODE_VERSION=16
5-
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \
6-
&& bash -c ". $HOME/.nvm/nvm.sh \
7-
&& nvm install $NODE_VERSION \
8-
&& nvm alias default $NODE_VERSION \
9-
&& npm install -g typescript yarn"
5+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
6+
ARG NODE_VERSION="16"
7+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
108

11-
# Install packages from apt
12-
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13-
&& apt-get -y install --no-install-recommends vim python3-pip python3-setuptools
9+
RUN apt-get update && \
10+
export DEBIAN_FRONTEND=noninteractive && \
11+
apt-get -y install --no-install-recommends \
12+
libgtk2.0-0 \
13+
libgtk-3-0 \
14+
libgbm-dev \
15+
libnotify-dev \
16+
libgconf-2-4 \
17+
libnss3 \
18+
libxss1 \
19+
libasound2 \
20+
libxtst6 xauth xvfb

.devcontainer/devcontainer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"dockerComposeFile": "docker-compose.yml",
44
"service": "app",
55
"workspaceFolder": "/workspace",
6+
"forwardPorts": [10000],
67

78
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
89

@@ -14,10 +15,14 @@
1415
"editorconfig.editorconfig",
1516
"gruntfuggly.todo-tree",
1617
"johnsoncodehk.volar",
18+
"mhutchie.git-graph",
1719
"ms-python.python",
1820
"naumovs.color-highlight",
1921
"oderwat.indent-rainbow",
2022
"pkief.material-icon-theme",
2123
"rangav.vscode-thunder-client"
22-
]
24+
],
25+
26+
// Connect as non-root user (https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user)
27+
"remoteUser": "vscode"
2328
}

.devcontainer/docker-compose.yml

100644100755
Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ services:
1414
- DISABLE_HEARTBEAT=1
1515
- JUDGE_SERVER_URL=http://judge-server-dev:8080
1616
- JUDGE_SERVER_TOKEN=CHANGE_THIS
17-
17+
- DISPLAY=:14
18+
- LIBGL_ALWAYS_INDIRECT=0
19+
- CYPRESS_BASE_URL=http://localhost:8080
20+
volumes_from:
21+
- x11-bridge:rw
22+
depends_on:
23+
- x11-bridge
1824
judge-server-dev:
1925
image: skkunpc/judge-server
2026
container_name: judge-server-dev
@@ -31,8 +37,7 @@ services:
3137
- /tmp
3238
volumes:
3339
- ../backend/data/test_case:/test_case:ro
34-
- ./judge-server/log:/log
35-
- ./judge-server/run:/judger
40+
- judger-data:/judger
3641
environment:
3742
- DISABLE_HEARTBEAT=1
3843
- TOKEN=CHANGE_THIS
@@ -53,6 +58,21 @@ services:
5358
volumes:
5459
- redis-data:/data
5560

61+
x11-bridge:
62+
image: jare/x11-bridge
63+
volumes:
64+
- "/tmp/.X11-unix:/tmp/.X11-unix:rw"
65+
ports:
66+
- "10000:10000"
67+
restart: always
68+
environment:
69+
- MODE=tcp
70+
- XPRA_HTML=yes
71+
- DISPLAY=:14
72+
- XPRA_TCP_PORT=10000
73+
- XPRA_PASSWORD=CHANGE_THIS
74+
5675
volumes:
5776
postgres-data: null
5877
redis-data: null
78+
judger-data: null

.devcontainer/postCreateCommand.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ SysOptions.judge_server_token='$JUDGE_SERVER_TOKEN'
3535

3636
# Install Node packages
3737
yarn --cwd /workspace/frontend install
38+
yarn --cwd /workspace/frontend cypress install

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ indent_size = 2
99

1010
[*.{py,sh,conf}]
1111
indent_size = 4
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

.github/workflows/build-image.yml renamed to .github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- master
77

88
jobs:
9-
build-image:
10-
runs-on: ubuntu-18.04
9+
build:
10+
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout to repository
@@ -20,11 +20,11 @@ jobs:
2020
uses: docker/login-action@v1
2121
with:
2222
registry: ghcr.io
23-
username: dotoleeoak
24-
password: ${{ secrets.CR_PAT }}
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
2525

2626
- name: Build and push container image
2727
uses: docker/build-push-action@v2
2828
with:
2929
push: true
30-
tags: ghcr.io/skku-npc/coding-platform:latest
30+
tags: ghcr.io/skkuding/coding-platform:latest

.github/workflows/test-backend.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
# Triggers the workflow on push or pull request events but only for the master branch
66
pull_request:
77
paths:
8-
- 'backend/**'
8+
- "backend/**"
9+
- ".github/workflows/test-backend.yml"
910

1011
# Allows you to run this workflow manually from the Actions tab
1112
workflow_dispatch:
@@ -22,8 +23,8 @@ jobs:
2223

2324
- uses: actions/setup-python@v2
2425
with:
25-
python-version: '3.7.10' # using SemVer's version range syntax
26-
architecture: 'x64'
26+
python-version: "3.8.10" # using SemVer's version range syntax
27+
architecture: "x64"
2728

2829
- uses: actions/cache@v2
2930
with:

.github/workflows/test-frontend.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ on:
66
pull_request:
77
paths:
88
- "frontend/**"
9+
- ".github/workflows/test-frontend.yml"
910

1011
# Allows you to run this workflow manually from the Actions tab
1112
workflow_dispatch:
1213

1314
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1415
jobs:
1516
test:
16-
runs-on: ubuntu-18.04
17+
runs-on: ubuntu-18.04
1718
env:
1819
working-directory: ./frontend
1920

@@ -22,7 +23,7 @@ jobs:
2223

2324
- uses: actions/setup-node@v2
2425
with:
25-
node-version: '14'
26+
node-version: "14"
2627

2728
- name: Cache Node modules
2829
id: cache-yarn
@@ -43,7 +44,7 @@ jobs:
4344
- name: Check styles
4445
working-directory: ${{ env.working-directory }}
4546
run: yarn lint --no-fix
46-
47+
4748
- name: Build production files
4849
working-directory: ${{ env.working-directory }}
4950
run: yarn build

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,6 @@ typings/
196196

197197
# devcontainer
198198
.devcontainer/data
199+
200+
# MacOS file
201+
.DS_Store

0 commit comments

Comments
 (0)