Skip to content

Commit 163ab09

Browse files
authored
Merge branch 'release' into develop
2 parents 46a1aa2 + 419cfb5 commit 163ab09

File tree

6 files changed

+147
-1
lines changed

6 files changed

+147
-1
lines changed

โ€Ž.dockerignoreโ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
Dockerfile
3+
.git
4+
.gitignore
5+
.dockerignore
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: release-autopull
2+
on:
3+
push:
4+
branches: release
5+
6+
jobs:
7+
distribute:
8+
name: distribute
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: git pull and restart docker
12+
uses: appleboy/ssh-action@master
13+
with:
14+
host: ${{secrets.REMOTE_IP}}
15+
username: ${{secrets.REMOTE_SSH_ID}}
16+
password: ${{secrets.REMOTE_PASSWORD}}
17+
port: ${{secrets.REMOTE_SSH_PORT}}
18+
script: |
19+
cd /root/runwithme
20+
git pull https://github.com/boostcampwm-2022/WEB26-RunWithMe.git release
21+
docker-compose down && docker-compose build --no-cache && docker-compose up -d
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: build + eslint check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- release
7+
8+
jobs:
9+
check:
10+
name: check
11+
runs-on: ubuntu-latest
12+
outputs:
13+
client: ${{steps.filter.outputs.client}}
14+
server: ${{steps.filter.outputs.server}}
15+
steps:
16+
- uses: dorny/paths-filter@v2
17+
id: filter
18+
with:
19+
filters: |
20+
client:
21+
- 'client/**'
22+
server:
23+
- 'server/**'
24+
25+
client:
26+
needs: check
27+
if: ${{needs.check.outputs.client=='true'}}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
33+
- name: Nodejs Setup
34+
uses: actions/setup-node@v2
35+
36+
- name: Cache client node modules
37+
id: cache-client
38+
uses: actions/cache@v3
39+
with:
40+
path: client/node_modules
41+
key: npm-packages-client-${{hashFiles('**/package-lock.json')}}
42+
43+
- name: Install client dependencies
44+
if: ${{steps.cache-client.outputs.cache-hit != 'true'}}
45+
run: cd client && npm install
46+
47+
- name: Client eslint check
48+
run: ./client/node_modules/.bin/eslint client/src --ext .ts,.tsx
49+
50+
- name: Run client build check
51+
run: cd client && npm run build
52+
53+
server:
54+
needs: check
55+
if: ${{needs.check.outputs.server=='true'}}
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v3
60+
61+
- name: Nodejs Setup
62+
uses: actions/setup-node@v2
63+
64+
- name: Cache server node modules
65+
id: cache-server
66+
uses: actions/cache@v3
67+
with:
68+
path: server/node_modules
69+
key: npm-packages-server-${{hashFiles('**/package-lock.json')}}
70+
71+
- name: Install server dependencies
72+
if: ${{steps.cache-server.outputs.cache-hit != 'true'}}
73+
run: cd server && npm install
74+
75+
- name: server eslint check
76+
run: ./server/node_modules/.bin/eslint server/src --ext .ts,.tsx
77+
78+
- name: Run server build check
79+
run: cd server && npm run build

โ€ŽDockerfile.prodโ€Ž

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:latest
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY . ./
6+
7+
WORKDIR /usr/src/app/client
8+
RUN npm install
9+
RUN npm run build
10+
11+
WORKDIR /usr/src/app/server
12+
RUN npm install
13+
RUN npm run build
14+
15+
EXPOSE 4000

โ€Žclient/src/pages/NewCourse/NewCourse.tsxโ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const NewCourse = () => {
4343
const { lng: x, lat: y } = getLatLngByXY(path[0]);
4444
const regions = await query({ x, y });
4545
// [0]: BCode, [1]: HCode
46-
4746
const { code: hCode } = regions.documents[1];
4847
const response: any = await post("/course", {
4948
title,

โ€Ždocker-compose.ymlโ€Ž

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: "3.8"
2+
3+
services:
4+
runwithme:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile.prod
8+
container_name: runwithme
9+
ports:
10+
- "4000:4000"
11+
command: npm run start
12+
networks:
13+
- webnet
14+
depends_on:
15+
- redis
16+
17+
redis:
18+
container_name: redis
19+
image: redis:5
20+
command: redis-server
21+
networks:
22+
- webnet
23+
ports:
24+
- "6379:6379"
25+
26+
networks:
27+
webnet:

0 commit comments

Comments
ย (0)