-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Alpha-e-Um/develop
Develop
- Loading branch information
Showing
97 changed files
with
4,018 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy React | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: react docker build and push | ||
run: | | ||
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
docker build -t ${{ secrets.DOCKER_REPO }}/eum-react:latest . | ||
docker push ${{ secrets.DOCKER_REPO }}/eum-react:latest | ||
- name: executing remote ssh commands using password | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.AWS_HOST }} | ||
username: ${{ secrets.AWS_ID }} | ||
key: ${{ secrets.AWS_KEY }} | ||
script: | | ||
if [ "$(sudo docker ps -qa)" ]; then | ||
sudo docker rm -f $(sudo docker ps -qa) | ||
fi | ||
sudo docker pull ${{ secrets.DOCKER_REPO }}/eum-react:latest | ||
cd alpha-e_um-deploy | ||
sudo docker-compose -f docker-compose.yaml up -d | ||
sudo docker image prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:alpine as builder | ||
WORKDIR /usr/src/app | ||
COPY package.json . | ||
RUN npm install | ||
COPY ./ ./ | ||
RUN npm run build | ||
|
||
FROM nginx | ||
EXPOSE 3000 | ||
COPY ./default.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=builder usr/src/app/build /usr/share/nginx/html |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
server { | ||
listen 3000; | ||
|
||
location / { | ||
|
||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const contestTestData = [ | ||
{ | ||
id: 1, | ||
deadline: 5, | ||
name: "창의력을 키우는 공모전", | ||
organizer: "창의력 협회", | ||
views: "1,234", | ||
}, | ||
{ | ||
id: 2, | ||
deadline: 6, | ||
name: "예술과 기술을 결합한 공모전", | ||
organizer: "미술과 기술 협회", | ||
views: "987", | ||
}, | ||
{ | ||
id: 3, | ||
deadline: 7, | ||
name: "환경 보호를 위한 공모전", | ||
organizer: "환경 보호 단체", | ||
views: "5,678", | ||
}, | ||
{ | ||
id: 4, | ||
deadline: 8, | ||
name: "환경 보호를 위한 공모전", | ||
organizer: "환경 보호 단체", | ||
views: "5,678", | ||
}, | ||
]; | ||
|
||
export default contestTestData; |
Oops, something went wrong.