build: add a run-dev.sh for local testing
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

This commit is contained in:
Radical 2025-05-02 16:23:45 +02:00
parent 2c73a07961
commit cc07d78325
2 changed files with 45 additions and 0 deletions

36
compose.dev.yml Normal file
View file

@ -0,0 +1,36 @@
version: '3.5'
volumes:
gorb-backend:
gorb-database:
networks:
gorb:
services:
backend:
image: gorb/backend
build:
dockerfile: ./Dockerfile
restart: always
ports:
- 8080:8080
networks:
- gorb
volumes:
- gorb-backend:/gorb
environment:
#- RUST_LOG=debug
- DATABASE_USERNAME=gorb
- DATABASE_PASSWORD=gorb
- DATABASE=gorb
- DATABASE_HOST=database
- DATABASE_PORT=5432
database:
image: postgres:16
restart: always
networks:
- gorb
volumes:
- gorb-database:/var/lib/postgresql/data
environment:
- POSTGRES_USER=gorb
- POSTGRES_PASSWORD=gorb
- POSTGRES_DB=gorb

9
run-dev.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
podman-compose --file compose.dev.yml up --build
echo "SHUTTING DOWN CONTAINERS"
podman container stop backend_backend_1 backend_database_1
echo "DELETING CONTAINERS"
podman container rm backend_backend_1 backend_database_1