4
scripts/db:shell.sh
Executable file
4
scripts/db:shell.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PGPASSWORD="cuddle"
|
||||
psql -h localhost -d cuddle -U cuddle
|
19
scripts/local_down.sh
Executable file
19
scripts/local_down.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker_compose_content=$(cat <<EOF
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: "postgres:latest"
|
||||
environment:
|
||||
POSTGRES_USER: cuddle
|
||||
POSTGRES_PASSWORD: cuddle
|
||||
POSTGRES_DB: cuddle
|
||||
ports:
|
||||
- "5432:5432"
|
||||
EOF)
|
||||
|
||||
docker-compose -p cuddle_local -f <(echo "$docker_compose_content") down --remove-orphans --volumes
|
24
scripts/local_up.sh
Executable file
24
scripts/local_up.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker_compose_content=$(cat <<EOF
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: "postgres:latest"
|
||||
environment:
|
||||
POSTGRES_USER: cuddle
|
||||
POSTGRES_PASSWORD: cuddle
|
||||
POSTGRES_DB: cuddle
|
||||
ports:
|
||||
- "5432:5432"
|
||||
EOF)
|
||||
|
||||
docker-compose -p cuddle_local -f <(echo "$docker_compose_content") up -d --remove-orphans
|
||||
|
||||
cat <<EOF > local.env
|
||||
DATABASE_URL=postgres://cuddle:cuddle@localhost:5432/cuddle
|
||||
EOF
|
||||
|
Reference in New Issue
Block a user