Skip to content

Commit

Permalink
Create bash dev scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitcher1991 committed Oct 5, 2024
1 parent 2f8e632 commit 4cca411
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
__pycache__
venv
.venv
.git
.gitignore
.gitattributes
.github
.idea
docs
scripts
bin
20 changes: 20 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
pip-log.txt
pip-delete-this-directory.txt
.tox
.coverage
.coverage.*
.cache
.gitignore
nosetests.xml
coverage.xml
.flake8
*,cover
.git
venv
.pre-commit-config.yaml
.pre-commit-hooks.yaml
1 change: 1 addition & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ coverage.xml
/static/redisboard/
/static/rest_framework/
celerybeat-schedule
celerybeat-schedule.*
supervisord.log
supervisord.pid

Expand Down
3 changes: 3 additions & 0 deletions bin/certbot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

certbot -d $1 -d $2 -d $3 -d $4
3 changes: 3 additions & 0 deletions bin/linux/docker-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

sudo docker compose --file docker-compose.dev.yml up --build
21 changes: 21 additions & 0 deletions bin/linux/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -e

source venv/bin/activate

cd backend

poetry run isort .

poetry run black .

cd ../frontend

yarn format

yarn lint

cd ../

git add .
21 changes: 21 additions & 0 deletions bin/linux/pre-develop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -e

cd frontend

yarn install

cd ../

python -m venv venv

source venv/bin/activate

cd backend

poetry install

./start-migrate.sh

wait
21 changes: 21 additions & 0 deletions bin/linux/start-full-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -e

echo -e "\033[0;32m[INFO]\033[0;0m Starting redis..."

echo -e "\033[0;32m[INFO]\033[0;0m Starting rabbit..."

echo -e "\033[0;32m[INFO]\033[0;0m Starting postgres..."

echo -e "\033[0;32m[INFO]\033[0;0m Starting kafka..."

echo -e "\033[0;32m[INFO]\033[0;0m Starting frontend..."

echo -e "\033[0;32m[INFO]\033[0;0m Starting backend..."

echo -e "\033[0;32m[INFO]\033[0;0m Starting celery..."

echo -e "\033[0;32m[INFO]\033[0;0m Starting flower..."

wait
10 changes: 10 additions & 0 deletions bin/linux/start-migrate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e

source venv/bin/activate

cd backend

python manage.py makemigrations
python manage.py migrate --check
5 changes: 5 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

sudo docker compose down

sudo docker compose up --build
Empty file added bin/windows/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
tmp
.swc
.gitignore
server
build

0 comments on commit 4cca411

Please sign in to comment.