Skip to content

Commit

Permalink
Merge pull request #9 from AlexanderBgit/lexxai
Browse files Browse the repository at this point in the history
scripts for macOS
  • Loading branch information
AlexanderBgit authored Apr 9, 2024
2 parents 6c26213 + 8c27202 commit cefbdb9
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 1 deletion.
1 change: 1 addition & 0 deletions deploy/docker-compose-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
- "8000:8000"

environment:
POSTGRES_HOST: pg
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker_app.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off

PUSHD "..\deploy"
ECHO "STOPPING SEPARATED DEV DB CONTAIMNINER"
ECHO "STOPPING SEPARATED DEV DB CONTAINER"
docker stop fastparking-db-postgres-1
rem docker-compose --file docker-compose-project.yml --env-file .env up -d
docker-compose --file docker-compose-project.yml --env-file .env up
Expand Down
7 changes: 7 additions & 0 deletions scripts/docker_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/zsh

pushd "../deploy"
echo "STOPPING SEPARATED DEV DB CONTAINER"
docker stop fastparking-db-postgres-1
docker-compose --file docker-compose-project.yml --env-file .env up
popd
5 changes: 5 additions & 0 deletions scripts/docker_app_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/zsh

pushd "../deploy"
docker-compose --file docker-compose-project.yml --env-file .env build code
popd
5 changes: 5 additions & 0 deletions scripts/docker_app_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/zsh

pushd "../deploy"
docker-compose --file docker-compose-project.yml --env-file .env run --rm code
popc
5 changes: 5 additions & 0 deletions scripts/docker_db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/zsh

pushd "../deploy"
docker-compose --file docker-compose-db.yml --env-file .env up -d
popd
11 changes: 11 additions & 0 deletions scripts/gen_req_txt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/zsh

# simulate poetry shell
pushd "../FRONTEND"
pyact=$(poetry env info -p)
source ${pyact}/bin/activate
popd

pushd "../FRONTEND/fastparking"
poetry export --without-hashes > requirements.txt
popd
11 changes: 11 additions & 0 deletions scripts/migrate_dev_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/zsh

# simulate poetry shell
pushd "../FRONTEND"
pyact=$(poetry env info -p)
source ${pyact}/bin/activate
popd

pushd "../FRONTEND/fastparking"
python manage.py migrate
popd
10 changes: 10 additions & 0 deletions scripts/run_dev_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/zsh

# simulate poetry shell
pushd "../FRONTEND"
pyact=$(poetry env info -p)
source ${pyact}/bin/activate
popd
pushd "../FRONTEND/fastparking"
python manage.py runserver 0.0.0.0:8000
popd

0 comments on commit cefbdb9

Please sign in to comment.