Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Database Removed #61

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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