Skip to content

Commit 2358414

Browse files
authored
Merge pull request #57 from ananjaemin/54-dockerizing
54 dockerizing
2 parents 8561d5e + 94c9666 commit 2358414

File tree

45 files changed

+434
-266
lines changed

Some content is hidden

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

45 files changed

+434
-266
lines changed

.env

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
PUBLIC_URL=/tempfiles-frontend
2-
REACT_APP_BACKEND_BASEURL= https://tfb.minpeter.cf
1+
PUBLIC_URL= '/'
2+
REACT_APP_BACKEND_BASEURL=http://localhost:5000
3+
# dev - http://localhost:5000
4+
# main - https://tfb.minpeter.cf
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Nodejs
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
22+
- name: Build
23+
run: npm run build
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v2
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
31+
- name: Login to Docker Hub
32+
uses: docker/login-action@v2
33+
with:
34+
username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
37+
- name: Build and push
38+
uses: docker/build-push-action@v3
39+
with:
40+
context: .
41+
push: true
42+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/tempfiles-frontend:latest

.github/workflows/main.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM nginx:latest
2+
3+
COPY build /usr/share/nginx/html
4+
5+
EXPOSE 80
6+
7+
CMD nginx -g 'daemon off;'

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "frontend",
33
"version": "0.1.0",
4-
"homepage": "https://ananjaemin.github.io/tempfiles-frontend/",
4+
"homepage": "https://tempfiles.ml/",
55
"private": true,
66
"dependencies": {
77
"@emotion/react": "^11.10.4",
@@ -58,4 +58,4 @@
5858
"prettier": "^2.7.1",
5959
"react-scripts": "^5.0.1"
6060
}
61-
}
61+
}

src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import 'react-toastify/dist/ReactToastify.css';
77
import { Navbar } from './components';
88
import {
99
MainPage,
10-
SuccessPage,
1110
DownloadPage,
1211
DeletePage,
1312
FileListPage,
1413
ApiPage,
1514
NotFoundPage,
15+
CheckPasswordPage,
1616
} from './pages';
1717
import { store } from './state/store';
1818

@@ -45,11 +45,11 @@ export const App: React.FC = () => (
4545
}
4646
>
4747
<Route index element={<MainPage />} />
48-
<Route path="/success" element={<SuccessPage />} />
4948
<Route path="/download" element={<DownloadPage />} />
5049
<Route path="/delete" element={<DeletePage />} />
5150
<Route path="/filelist" element={<FileListPage />} />
5251
<Route path="/api/*" element={<ApiPage />} />
52+
<Route path="/checkpw" element={<CheckPasswordPage />} />
5353
<Route path="*" element={<NotFoundPage />} />
5454
</Route>
5555
</Routes>

src/assets/lockIcon.svg

Lines changed: 22 additions & 0 deletions
Loading

src/components/common/Button/styled.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import styled from '@emotion/styled';
22

33
export const ButtonContainer = styled.input<{ bgColor: string }>`
44
background-color: ${(props) => props.bgColor};
5-
border-radius: 8px;
5+
border-radius: 0.8rem;
66
outline: none;
77
font-size: 2rem;
88
font-weight: 700;
99
width: 14rem;
1010
height: 6rem;
1111
border: 0;
1212
color: var(--color-text-primary);
13-
margin: 0px 10px 0px 10px;
13+
margin: 0px 1rem 0px 1rem;
1414
`;
1515

1616
ButtonContainer.defaultProps = { type: 'button' };

src/components/common/CheckBox/styled.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import styled from '@emotion/styled';
33
export const CheckBoxContainer = styled.div`
44
display: flex;
55
align-items: center;
6-
margin-right: 40px;
6+
margin-right: 4rem;
77
`;
88

99
export const CheckBoxObject = styled.div<{ isCheck: boolean }>`
1010
width: 2.4rem;
1111
height: 2.4rem;
12-
padding: 5px;
13-
margin: 5px 12px 5px 5px;
14-
border-radius: 3px;
12+
padding: 0.5rem;
13+
margin: 0.5rem 1.2rem 0.5rem 0.5rem;
14+
border-radius: 0.3rem;
1515
background-color: ${(props) =>
1616
props.isCheck ? 'var(--color-check-true-background)' : 'var(--color-check-false-background)'};
1717
`;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import styled from '@emotion/styled';
2+
3+
export const FileBox = styled.div`
4+
background-color: var(--color-backgorund-filelistbox);
5+
color: var(--color-text-tertiary);
6+
border-radius: 1rem;
7+
padding: 1.2rem 1.2rem 1.2rem 1.2rem;
8+
display: flex;
9+
flex-direction: row;
10+
align-items: center;
11+
font-size: 2.2rem;
12+
`;

0 commit comments

Comments
 (0)