Skip to content

Commit

Permalink
try fix CI #16. Add DATABASE_HOST environment to application
Browse files Browse the repository at this point in the history
  • Loading branch information
Anvill1 committed Jan 9, 2025
1 parent 3ee5302 commit 24c494e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:
docker ps
docker logs soloanvill_backend-soloanvill-backend-1
docker logs soloanvill_backend-db-1
netstat -tulpn | grep 5432
nc -zv 127.0.0.1 5432
sudo su postgres
psql -h 127.0.0.1 -p 5432 -c "\du+"
psql -h 127.0.0.1 -p 5432 -c "\dt+"
status=$(curl -s 127.0.0.1/api/health | grep -oP '(?<="status":")[^"]+')
curl -s 127.0.0.1/api/health
if [[ "$status" == "up" ]]; then
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ networks:

services:
db:
image: bitnami/postgresql:16.3.0-debian-12-r16
image: postgres:16-alpine
restart: always
environment:
POSTGRESQL_USERNAME: soloanvill
Expand All @@ -24,6 +24,8 @@ services:
- 80:8080
volumes:
- ./config.yml:/app/config.yml
environment:
SOLOANVILL_DATABASE_HOST: db
depends_on:
db:
condition: service_started
Expand Down

0 comments on commit 24c494e

Please sign in to comment.