이름 | 역할 |
---|---|
김태형 | Backend OAuth GameSocket |
권지원 | Backend User Relation ChatSocket |
성하림 | Devops Frontend |
신재훈 | Frontend Css |
versions we used for development are specified in parenthesis.
- Docker Desktop (4.10.1)
or - Docker Engine (20.10.17) and Docker Compose (2.6.1)
- GNU Make (3.81)
- GNU Bash (3.2.57)
-
clone git repository into a location you want.
git clone https://github.com/tehyoyee/42-transcendence.git && cd 42-transcendence
-
launch
- manual
cp $PWD/tools/.env_sample $PWD/.env
- open .env with text editor and substitute variables(e.g. {{IP ADDRESS}}) with value you want to use.
- run
docker compose up --build
- automated
- run
make
- follow instructions to set environment variables and development mode.
- run
- manual
-
manage
- You can use below Makefile targets.
make up
executesdocker-compose up --build
make down
executesdocker-compose down
.make stop
stops every docker containers.make rmc
tries to remove every docker containers.make rmi
tries to remove every docker images.
- If you don't have Make, it's recommended to find necessary shell commands in Makefile and execute them manually in shell.
- You can use below Makefile targets.
42-transcendence
├── Makefile
├── docker-compose.yml
├── backend
│ ├── Dockerfile
│ ├── tools
│ │ └── entrypoint.sh
│ │
│ │# configs for npm install
│ ├── package-lock.json
│ ├── package.json
│ ├── tsconfig.json
│ │
│ │# directory for configs containing environment variables
│ ├── config
│ │
│ │# backend source code mount volume
│ ├── src
│ │
│ │# directory for avatar image storage
│ └── uploads
│
├── frontend
│ ├── Dockerfile
│ │
│ │# configs for npm install and environment variables
│ ├── config
│ ├── entrypoint.sh
│ │
│ │# each child directories are seperate mount volume
│ └── resource
│ │# nextjs app router for routing, layout, pages, global css, fonts and etc.
│ ├── app
│ ├── components
│ ├── lib # custom hooks
│ ├── public # image resource
│ └── styles # css
│
│# mount volume for DB
├── postgres-data
│
│# setup automation script
└── tools
- You can change source code and reflect it immediately by using development mode which is provided by setup script or manually setting each
FRONTEND_RUN
,BACKEND_RUN
environment variables to'dev'
,'start:dev'
.