Docker compose profiles
This commit is contained in:
parent
14e7282d6c
commit
4978fb95dd
8 changed files with 16 additions and 14 deletions
|
|
@ -22,6 +22,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
|
profiles: ["postgres"]
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -34,6 +35,7 @@ services:
|
||||||
- db
|
- db
|
||||||
sql:
|
sql:
|
||||||
image: mcr.microsoft.com/mssql/server:2022-CU19-ubuntu-22.04
|
image: mcr.microsoft.com/mssql/server:2022-CU19-ubuntu-22.04
|
||||||
|
profiles: ["sql"]
|
||||||
user: root
|
user: root
|
||||||
environment:
|
environment:
|
||||||
- SA_PASSWORD=NvQp8s@l
|
- SA_PASSWORD=NvQp8s@l
|
||||||
|
|
|
||||||
4
configs/deployment/scripts/2-data-postgres.sh
Normal file
4
configs/deployment/scripts/2-data-postgres.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
cd ~/kurs-platform/configs/deployment
|
||||||
|
|
||||||
|
docker compose -f docker-compose-data.yml --profile postgres down
|
||||||
|
docker compose -f docker-compose-data.yml --profile postgres up -d
|
||||||
4
configs/deployment/scripts/2-data-sql.sh
Normal file
4
configs/deployment/scripts/2-data-sql.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
cd ~/kurs-platform/configs/deployment
|
||||||
|
|
||||||
|
docker compose -f docker-compose-data.yml --profile sql down
|
||||||
|
docker compose -f docker-compose-data.yml --profile sql up -d
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
cd ~/kurs-platform/configs/deployment
|
|
||||||
|
|
||||||
docker compose -f docker-compose-data.yml down
|
|
||||||
docker compose -f docker-compose-data.yml up -d
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
export SEED=false
|
|
||||||
if [ $1 == true ]; then
|
|
||||||
SEED=true
|
|
||||||
fi
|
|
||||||
echo "Seed değeri: ${SEED}"
|
|
||||||
|
|
||||||
docker compose -f docker-compose-data.yml down migrator
|
|
||||||
docker compose -f docker-compose-data.yml up migrator -d
|
|
||||||
sleep 2
|
|
||||||
docker compose -f docker-compose-data.yml logs migrator
|
|
||||||
|
|
@ -23,6 +23,7 @@ services:
|
||||||
command: "/public -c10 --cors"
|
command: "/public -c10 --cors"
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
|
profiles: ["postgres"]
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -35,6 +36,7 @@ services:
|
||||||
- PGTZ=UTC
|
- PGTZ=UTC
|
||||||
sql:
|
sql:
|
||||||
image: mcr.microsoft.com/mssql/server:2022-CU19-ubuntu-22.04
|
image: mcr.microsoft.com/mssql/server:2022-CU19-ubuntu-22.04
|
||||||
|
profiles: ["sql"]
|
||||||
user: root
|
user: root
|
||||||
environment:
|
environment:
|
||||||
- SA_PASSWORD=NvQp8s@l
|
- SA_PASSWORD=NvQp8s@l
|
||||||
|
|
|
||||||
2
configs/docker/scripts/1-data-postgres.bat
Normal file
2
configs/docker/scripts/1-data-postgres.bat
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
docker compose -f ../docker-compose-data.yml --profile postgres down
|
||||||
|
docker compose -f ../docker-compose-data.yml --profile postgres up -d
|
||||||
2
configs/docker/scripts/1-data-sql.bat
Normal file
2
configs/docker/scripts/1-data-sql.bat
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
docker compose -f ../docker-compose-data.yml --profile sql down
|
||||||
|
docker compose -f ../docker-compose-data.yml --profile sql up -d
|
||||||
Loading…
Reference in a new issue