Skip to content

sylvainnicolet-42/42-transcendence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-transcendence

Prerequisites

Setup

  1. Build images:
make docker-build
  1. Before running the docker images, you need to create a .env file in the root directory and fill it with your own values:
mv .env.example .env
  1. Run the docker images:
make docker-up

Now you can access:


Docker

To build the docker images, run the following command:

make docker-build

To run the docker images, run the following command:

make docker-up

To go inside a docker image, run the following commands:

make docker-frontend # for the frontend
make docker-backend # for the backend

To stop the docker images, run the following command:

make docker-down

Django

Some useful commands.

Go inside the backend docker image and set up a virtual environment:

make docker-backend # go inside the backend docker image
python3 -m venv venv
source venv/bin/activate

Install a dependency:

pip install --upgrade pip
pip install your-dependency

Generate requirements.txt:

pip freeze > src/requirements.txt

Create new app:

cd src
python manage.py startapp your-app-name

Create migrations:

python manage.py makemigrations

Apply migrations:

python manage.py migrate

Create fixtures from api:

python manage.py dumpdata api > data.json

Load fixtures:

python manage.py loaddata data.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published