<aside> 💡 dist.zip release 한 뒤에 BE 이미지 만들기 (순서 지켜야함)

</aside>

sudo su - root
cd /var/lib/docker
chmod -R 777 overlay2
chmod -R +x overlay2

Docker hub 관련

docker build --tag juyeonk/onlinejudge1:1.0 .
docker push juyeonk/onlinejudge1:1.0

docker pull mksin00/judgeserver1:1.0
docker pull juyeonk/onlinejudge1:1.0
docker pull 1114nhj/onlinejudge1:1.0
docker pull mksin00/postgres:10-alpine

docker image tag juyeonk/onlinejudge1:1.0 onlinejudge1:1.0
docker image tag 1114nhj/onlinejudge1:1.0 onlinejudge1:1.0
docker image tag mksin00/judgeserver1:1.0 judgeserver1:1.0
docker image tag mksin00/postgres:10-alpine postgres:10-alpine

# <https://api.github.com/repos/Sejong-Creative-Semester2021/Sejong.creative.semester.2021/releases/latest>

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL <https://download.docker.com/linux/ubuntu/gpg> | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] <https://download.docker.com/linux/ubuntu> bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce

sudo curl -L <https://github.com/docker/compose/releases/download/1.25.0-rc2/docker-compose-`uname> -s`-`uname -m` -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose
sudo usermod -aG docker ubuntu

sudo apt install git
ssh -i "online_judge_sejong.pem" [email protected]

online_judge_sejong.pem

vue 배포 명령어

Untitled

Untitled

npm run build
npm cache clean --force
rm -rf node_modules package-lock.json
npm install

→ package.json에서 "extract-text-webpack-plugin": "^3.0.2",

FE 실행

npm install #이건 한번 해두면 안해도 됨
export NODE_ENV=development
npm run build:dll
export TARGET=http://172.18.0.1 # 이건 본인 네트워크 번호
npm run dev

docker 내부 postgreSQL 여는 방법

sudo docker exec -it oj-postgres bash
su - postgres
psql --username onlinejudge --dbname onlinejudge
\\dt # 테이블 목록 확인

SELECT * from ai_contest; # SQL 사용해서 보면 됨

백엔드 이미지 빌드