docker run --rm --network=host --env PGPASSWORD=secret -v "./db:/tmp/dump"\
docker run --rm --network=host --env PGPASSWORD=secret -v "./db:/tmp/dump"\
postgres pg_dump \
postgres pg_dump \
--schema-only \
--schema-only \
--host=192.168.0.153\
--host=localhost \
--port=5432\
--port=5432\
--username=postgres \
--username=postgres \
-v --dbname="koitodb" -f "/tmp/dump/schema.sql"
-v --dbname="koitodb" -f "/tmp/dump/schema.sql"
@ -27,15 +18,15 @@ postgres.start:
postgres.stop:
postgres.stop:
docker stop koito-db
docker stop koito-db
postgres.rm:
docker rm bamsort-db
api.debug:
api.debug:
KOITO_ALLOWED_HOSTS=* KOITO_LOG_LEVEL=debug KOITO_CONFIG_DIR=test_config_dir KOITO_DATABASE_URL=postgres://postgres:secret@192.168.0.153:5432/koitodb?sslmode=disable go run cmd/api/main.go
KOITO_ALLOWED_HOSTS=* KOITO_LOG_LEVEL=debug KOITO_CONFIG_DIR=test_config_dir KOITO_DATABASE_URL=postgres://postgres:secret@localhost:5432?sslmode=disable go run cmd/api/main.go
api.test:
api.test:
go test ./... -timeout 60s
go test ./... -timeout 60s
api.build:
CGO_ENABLED=1 go build -ldflags='-s -w' -o koito ./cmd/api/main.go