fix: make container work properly
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

Tested-by: Radical <radical@radical.fun>
This commit is contained in:
Radical 2025-05-25 19:20:02 +02:00
parent 6c47d22ae6
commit 6640d03b70
5 changed files with 24 additions and 21 deletions

View file

@ -18,16 +18,16 @@ RUN useradd --create-home --home-dir /gorb gorb
USER gorb USER gorb
ENV DATABASE_USERNAME="gorb" \ ENV DATABASE_USERNAME=gorb \
DATABASE_PASSWORD="gorb" \ DATABASE_PASSWORD=gorb \
DATABASE="gorb" \ DATABASE=gorb \
DATABASE_HOST="database" \ DATABASE_HOST=database \
DATABASE_PORT="5432" \ DATABASE_PORT=5432 \
CACHE_DB_HOST="valkey" \ CACHE_DB_HOST=valkey \
CACHE_DB_PORT="6379" \ CACHE_DB_PORT=6379 \
BUNNY_API_KEY="your_storage_zone_password_here" \ BUNNY_API_KEY=your_storage_zone_password_here \
BUNNY_ENDPOINT="Frankfurt" \ BUNNY_ENDPOINT=Frankfurt \
BUNNY_ZONE="gorb" \ BUNNY_ZONE=gorb \
BUNNY_CDN_URL="https://cdn.gorb.app" BUNNY_CDN_URL=https://cdn.gorb.app
ENTRYPOINT ["/usr/bin/entrypoint.sh"] ENTRYPOINT ["/usr/bin/entrypoint.sh"]

View file

@ -23,10 +23,10 @@ services:
- DATABASE=gorb - DATABASE=gorb
- DATABASE_HOST=database - DATABASE_HOST=database
- DATABASE_PORT=5432 - DATABASE_PORT=5432
- BUNNY_API_KEY="your_storage_zone_password_here" - BUNNY_API_KEY=your_storage_zone_password_here
- BUNNY_ENDPOINT="Frankfurt" - BUNNY_ENDPOINT=Frankfurt
- BUNNY_ZONE="gorb" - BUNNY_ZONE=gorb
- BUNNY_CDN_URL="https://cdn.gorb.app" - BUNNY_CDN_URL=https://cdn.gorb.app
database: database:
image: postgres:16 image: postgres:16
restart: always restart: always

View file

@ -21,10 +21,10 @@ services:
- DATABASE=gorb - DATABASE=gorb
- DATABASE_HOST=database - DATABASE_HOST=database
- DATABASE_PORT=5432 - DATABASE_PORT=5432
- BUNNY_API_KEY="your_storage_zone_password_here" - BUNNY_API_KEY=your_storage_zone_password_here
- BUNNY_ENDPOINT="Frankfurt" - BUNNY_ENDPOINT=Frankfurt
- BUNNY_ZONE="gorb" - BUNNY_ZONE=gorb
- BUNNY_CDN_URL="https://cdn.gorb.app" - BUNNY_CDN_URL=https://cdn.gorb.app
database: database:
image: postgres:16 image: postgres:16
restart: always restart: always

View file

@ -49,4 +49,7 @@ rotate_log() {
rotate_log "/gorb/logs/backend.log" rotate_log "/gorb/logs/backend.log"
# Give the DB time to start up before connecting
sleep 5
/usr/bin/gorb-backend --config /gorb/config/config.toml 2>&1 | tee /gorb/logs/backend.log /usr/bin/gorb-backend --config /gorb/config/config.toml 2>&1 | tee /gorb/logs/backend.log

View file

@ -3,7 +3,7 @@
podman-compose --file compose.dev.yml up --build podman-compose --file compose.dev.yml up --build
echo "SHUTTING DOWN CONTAINERS" echo "SHUTTING DOWN CONTAINERS"
podman container stop backend_backend_1 backend_database_1 podman container stop backend_backend_1 backend_database_1 backend_valkey_1
echo "DELETING CONTAINERS" echo "DELETING CONTAINERS"
podman container rm backend_backend_1 backend_database_1 podman container rm backend_backend_1 backend_database_1 backend_valkey_1