Skip to content

Commit

Permalink
Docker Database Removed
Browse files Browse the repository at this point in the history
  • Loading branch information
NumanIbnMazid committed Aug 28, 2024
1 parent 88f5aca commit 3d36f4d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
11 changes: 6 additions & 5 deletions backend/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/sh

echo "Waiting for postgres..."
# Currently using remote DB. Uncomment while use Docker DB.
# echo "Waiting for postgres..."

while ! nc -z db 5432; do
sleep 0.1
done
# while ! nc -z db 5432; do
# sleep 0.1
# done

echo "PostgreSQL started"
# echo "PostgreSQL started"

python manage.py migrate --noinput || exit 1

Expand Down
24 changes: 12 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
services:
db:
image: postgres:14.5-alpine
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- PGDATA=/var/lib/postgresql/data/db-files
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
networks:
- net-tier
# db:
# image: postgres:14.5-alpine
# volumes:
# - ./data/db:/var/lib/postgresql/data
# environment:
# - PGDATA=/var/lib/postgresql/data/db-files
# - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
# networks:
# - net-tier

backend:
depends_on:
- db
# depends_on:
# - db
env_file: .env
container_name: backend
environment:
WAIT_HOSTS: db:5432
# WAIT_HOSTS: db:5432
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
till now.]]></description>
<link>https://nim23.com</link>
<generator>RSS for Node</generator>
<lastBuildDate>Wed, 28 Aug 2024 17:02:14 GMT</lastBuildDate>
<lastBuildDate>Wed, 28 Aug 2024 18:45:00 GMT</lastBuildDate>
<atom:link href="https://nim23.com/feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Wed, 28 Aug 2024 17:02:14 GMT</pubDate>
<pubDate>Wed, 28 Aug 2024 18:45:00 GMT</pubDate>
<copyright><![CDATA[All rights reserved 2024, Numan Ibn Mazid]]></copyright>
<language><![CDATA[en]]></language>
</channel>
Expand Down

0 comments on commit 3d36f4d

Please sign in to comment.