automate migrations in docker
This commit is contained in:
6
.env.dev
6
.env.dev
@@ -11,14 +11,14 @@ DB_NAME=Development
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=pfLIVXupbDetvFMt2gUvxLXUL9b4HIOHaPcKXsBEZ1i8zl0iLUjmhUfXlGfJKcTV
|
||||
|
||||
ENV RUNNING_IN_DOCKER=1
|
||||
RUNNING_IN_DOCKER=1
|
||||
|
||||
CORS_ALLOWED_ORIGINS=http://localhost:8080,http://127.0.0.1:8080,http://127.0.0.1:3000,http://localhost:3000,http://192.168.88.130:3000,https://rasadyar.net,https://rasaddam-front.liara.run,https://dam.rasadyar.net,https://dam.rasadyar.com,https://api.dam.rasadyar.com
|
||||
|
||||
REDIS_URL=redis://default:wHM2fSW8EXtsoTjHxLZyyaRsD8IJm4tOU108252rizfmUYrp709PuCLUhr9mmYDK@31.7.78.133:14353/0
|
||||
|
||||
CELERY_BROKER_URL=rediss://default:wHM2fSW8EXtsoTjHxLZyyaRsD8IJm4tOU108252rizfmUYrp709PuCLUhr9mmYDK@31.7.78.133:14353/0
|
||||
CELERY_RESULT_BACKEND=rediss://default:wHM2fSW8EXtsoTjHxLZyyaRsD8IJm4tOU108252rizfmUYrp709PuCLUhr9mmYDK@31.7.78.133:14353/0
|
||||
CELERY_BROKER_URL=redis://default:wHM2fSW8EXtsoTjHxLZyyaRsD8IJm4tOU108252rizfmUYrp709PuCLUhr9mmYDK@31.7.78.133:14353/0
|
||||
CELERY_RESULT_BACKEND=redis://default:wHM2fSW8EXtsoTjHxLZyyaRsD8IJm4tOU108252rizfmUYrp709PuCLUhr9mmYDK@31.7.78.133:14353/0
|
||||
CELERY_CACHE_BACKEND=default
|
||||
|
||||
# Super user information
|
||||
|
||||
@@ -21,4 +21,4 @@ COPY . /app/
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD ["python", "manage.py", "runserver", "0.0.0.0:5000"]
|
||||
CMD ["/entrypoint.sh"]
|
||||
@@ -116,7 +116,7 @@ WSGI_APPLICATION = 'Rasaddam_Backend.wsgi.application'
|
||||
|
||||
MONGODB_DATABASES = {
|
||||
"default": {
|
||||
"name": 'mongodb',
|
||||
"name": '-',
|
||||
"host": "",
|
||||
"tz_aware": True, # if you using timezones in django (USE_TZ = True) # noqa
|
||||
},
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "🚀 Make migrations..."
|
||||
python manage.py migrate --noinput
|
||||
|
||||
echo "🚀 Applying database migrations..."
|
||||
python manage.py migrate --noinput
|
||||
|
||||
echo "🎯 Collect static files..."
|
||||
python manage.py collectstatic --noinput
|
||||
|
||||
echo "✅ Starting Django server..."
|
||||
python manage.py runserver 0.0.0.0:5000
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user