Skip to content

Commit

Permalink
Merge pull request #1 from sfujiwara/feature/material-ui
Browse files Browse the repository at this point in the history
New design with Material UI and React
  • Loading branch information
sfujiwara authored Apr 29, 2024
2 parents 381ffce + 327b41f commit 181af59
Show file tree
Hide file tree
Showing 17 changed files with 4,513 additions and 311 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
frontend/node_modules
frontend/dist
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
dist
node_modules
.terraform
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
FROM node:22.0 AS build

WORKDIR /app

COPY frontend frontend
COPY Makefile Makefile

WORKDIR /app/frontend

RUN npm install
RUN npm run build


FROM nginx:1.15.12-alpine

COPY index.html /usr/share/nginx/html/index.html
COPY style.css /usr/share/nginx/html/style.css
# /etc/nginx/nginx.conf refers /etc/nginx/conf.d/*.conf.
COPY default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/frontend/dist /usr/share/nginx/html

EXPOSE 8080

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ PROJECT := sfujiwara
docker-build:
docker build -t $(DOCKER_IMAGE) .

docker-run:
docker run -p 8080:8080 $(DOCKER_IMAGE)

docker-push:
docker push $(DOCKER_IMAGE)

Expand All @@ -28,3 +31,6 @@ terraform-plan:

terraform-apply:
cd terraform && terraform apply

start:
cd frontend && pnpm run dev
12 changes: 12 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shuhei Fujiwara</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 181af59

Please sign in to comment.