Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
POSTGRES_USER=<your_postgres_user>
POSTGRES_PASSWORD=<your_postgres_password>

DB_NAME=<your_db_name>
DB_USER=<your_db_user>
DB_PASSWORD=<your_db_password>
DB_HOST=<your_db_host>
DB_PORT=<your_db_port>

DJANGO_SUPERUSER_USERNAME=<your_django_superuser_username>
DJANGO_SUPERUSER_PASSWORD=<your_django_superuser_password>
DJANGO_SUPERUSER_EMAIL=<your_django_superuser_email>

OAUTH_URL=https://api.intra.42.fr/oauth/authorize
OAUTH_CLIENT_ID=<your_oauth_client_id>
OAUTH_CLIENT_SECRET=<your_oauth_client_secret>
OAUTH_REDIRECT_URI=<your_oauth_redirect_uri>
OAUTH_TOKEN_URL=https://api.intra.42.fr/oauth/token
OAUTH_USER_INFO_URL=https://api.intra.42.fr/v2/me
OAUTH_STATE=<your_random_state_string>

SECRET_KEY=<your_django_secret_key>

EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST=<your_email_host>
EMAIL_PORT=<your_email_port>
EMAIL_HOST_USER=<your_email_host_user>
EMAIL_HOST_PASSWORD=<your_email_host_password>
DEFAULT_FROM_EMAIL=<your_default_from_email>

CONTRACT_ADDRESS=<your_contract_address>
RPC_URL=<your_rpc_url>
PRIVATE_KEY=<your_private_key>

HOST_ADDRESS=<your_backend_address>
48 changes: 36 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
# OS
.DS_Store

# Nginx
default.conf

# vite
node_modules/

# Django
0001_initial.py
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -72,6 +62,7 @@ cover/
local_settings.py
db.sqlite3
db.sqlite3-journal
0001_initial.py

# Flask stuff:
instance/
Expand Down Expand Up @@ -106,12 +97,18 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
Expand All @@ -134,7 +131,12 @@ celerybeat.pid
*.sage.py

# Environments
# Environment files
.env
.env.local*
.env.test*
.env.development*
.env.production*
.venv
env/
venv/
Expand Down Expand Up @@ -172,3 +174,25 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# PyPI configuration file
.pypirc

# Miscellaneous files
.DS_Store
*.pem

# VSCode specific files
.vscode/
tempCodeRunnerFile.*

# Git related files
*.patch

# Python specific files
.venv
__pycache__/

# My specific files
review.md
default.conf
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,24 @@ RESET := \033[0m

all:
@sh nginx/make_config.sh
@$(MAKE) build
@sh set_env_production.sh
@$(MAKE) up

build:
@echo "🐳 $(FG_BLUE)Building images$(RESET) 🐳"
@docker-compose -f docker-compose.yml build
@echo "🛠 $(FG_GREEN)Built images$(RESET) 🛠"

up:
@docker-compose -f docker-compose.yml up -d
@docker compose -p transcendence -f docker-compose.yml up --build -d
@echo "🛜 $(FG_GREEN)Connect to $(FG_WHITE)$(UNDERLINE)https://localhost$(RESET) 🛜"

down:
@docker-compose -f docker-compose.yml down
@docker compose -p transcendence -f docker-compose.yml down
@echo "🚫 $(FG_RED)Disconnected$(RESET) 🚫"

stop:
@docker-compose -f docker-compose.yml stop
@docker compose -p transcendence -f docker-compose.yml stop
@echo "🛑 $(FG_YELLOW)Stopped$(RESET) 🛑"

start:
@echo "$(FG_GREEN)Started$(RESET)"
@docker-compose -f docker-compose.yml start
@docker compose -p transcendence -f docker-compose.yml start
@echo "$(FG_GREEN)Connect to $(FG_WHITE)$(UNDERLINE)https://localhost$(RESET)"

re:
Expand All @@ -61,7 +56,7 @@ re:

log:
@echo "📄 $(FG_CYAN)Logs$(RESET) 📄"
@docker-compose -f docker-compose.yml logs -f
@docker compose -p transcendence -f docker-compose.yml logs -f

clean:
@$(MAKE) down
Expand All @@ -71,7 +66,6 @@ clean:
fclean:
@$(MAKE) down
@docker system prune -af --volumes
@docker volume rm transcendence_db_data
@echo "🧹 $(FG_BLUE)Fully cleaned up$(RESET) 🧹"

populatedb:
Expand Down
Loading