Skip to content

Commit

Permalink
Merge pull request #21 from 42Seoul-LastDance/main
Browse files Browse the repository at this point in the history
Sync Fork
  • Loading branch information
Tolerblanc authored Sep 15, 2023
2 parents 193d284 + a1dbe40 commit 50a1ae5
Show file tree
Hide file tree
Showing 38 changed files with 4,912 additions and 70 deletions.
16 changes: 0 additions & 16 deletions .env

This file was deleted.

21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,29 @@ all : $(NAME)

$(NAME) :
mkdir -p ./srcs/postgresql
docker-compose up --build
@if docker info | grep -q "ERROR"; then \
echo "\033[0;96m--- Docker will be running soon ---"; \
echo "y" | ./utils/init_docker.sh; \
while docker info | grep -q "ERROR"; do \
sleep 1; \
done >/dev/null 2>&1; \
docker-compose up --build; \
else \
echo "\033[0;96m--- Docker is already running ---"; \
docker-compose up --build; \
fi

down :
docker-compose down
@rm -rf $(NAME)

clean :
make down
docker system prune -af
@docker system prune -af

fclean :
make clean
docker volume rm $$(docker volume ls -q -f dangling=true) || docker volume ls
@docker volume rm $$(docker volume ls -q -f dangling=true) || docker volume ls

re :
make fclean
Expand All @@ -31,8 +41,7 @@ stest :
xtest :
docker exec next curl http://localhost:4242

next :
docker exec -it next npx create-next-app srcs/my-app
docker exec next npm --prefix srcs/my-app run dev
exec :
docker exec -it react /bin/bash

.PHONY : all down clean fclean docker cntest stest xtest next
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

### 사용법

| Tag name | Description |
|:-------------------|:------------|
|**Feat** |새로운 기능을 추가|
|**Fix** |버그 수정|
|**Design** |CSS 등 사용자 UI 디자인 변경|
|**!BREAKING CHANGE**|커다란 API 변경의 경우|
|**!HOTFIX** |급하게 치명적인 버그를 고쳐야하는 경우|
|**Style** |코드 포맷 변경, 세미 콜론 누락, 코드 수정이 없는 경우|
|**Refactor** |프로덕션 코드 리팩토링|
|**Comment** |필요한 주석 추가 및 변경|
|**Docs** |문서 수정|
|**Test** |테스트 코드, 리펙토링 테스트 코드 추가, Production Code(실제로 사용하는 코드) 변경 없음|
|**Chore** |빌드 업무 수정, 패키지 매니저 수정, 패키지 관리자 구성 등 업데이트, Production Code 변경 없음|
|**Rename** |파일 혹은 폴더명을 수정하거나 옮기는 작업만인 경우|
|**Remove** |파일을 삭제하는 작업만 수행한 경우|

1. 레포 클론

```bash
Expand Down
11 changes: 6 additions & 5 deletions services/next/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ WORKDIR /usr/app
RUN apt-get update \
&& apt-get install -y dumb-init \
&& npm install -g npm
# \
# && npm install typescript --save-dev \
# && npm install express pg cors \
# && npx tsc --init

COPY init.sh .

RUN chmod 777 init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

CMD ["tail", "-f"]
CMD ["./init.sh"]
#CMD ["tail", "-f"]
14 changes: 14 additions & 0 deletions services/next/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
echo "----- Start installing npm dependencies -----"

npm install --prefix srcs next
npm install --prefix srcs --save redux
npm install --prefix srcs --save react-redux
npm install --prefix srcs --save @reduxjs/toolkit
# npm install --prefix srcs --save react-unity-webgl
# npm install --prefix srcs --save nextjs-unity-webgl
# npm install --prefix srcs --save axios
# npm install --prefix srcs --save axios-auth-refresh
# npm install --prefix srcs --save react-router-dom
echo "----- Successfully installed -----"

npm --prefix srcs run dev
3 changes: 3 additions & 0 deletions srcs/next/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
35 changes: 35 additions & 0 deletions srcs/next/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
34 changes: 34 additions & 0 deletions srcs/next/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
18 changes: 0 additions & 18 deletions srcs/next/index.html

This file was deleted.

4 changes: 4 additions & 0 deletions srcs/next/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}

module.exports = nextConfig
Loading

0 comments on commit 50a1ae5

Please sign in to comment.