10 months ago
2 warnings found (use --debug to expand):
UndefinedVar: Usage of undefined variable '$NIXPACKS_PATH' (line 18)
LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 18)
Dockerfile:24
22 | # release phase
23 | COPY . /app/.
24 | >>> RUN python manage.py migrate && gunicorn ecomm.wsgi
25 |
26 |
ERROR: failed to solve: process "/bin/bash -ol pipefail -c python manage.py migrate && gunicorn ecomm.wsgi" did not complete successfully: exit code: 1
Error: Docker build failed//// hello there here i am again i have try around 19 times to build this project and every time i have something different can someone pls help me with this i am getting nu..
ⓘ Deployment information is only viewable by project members and Railway employees.
5 Replies
10 months ago
From your build logs -
ValueError: DATABASE_PUBLIC_URL environment variable is not set or is invalid
10 months ago
hey there brody! I have tried different aproaches to solve that issue' ok here is my data base settings.py
#parse the database url
DATABASE_URL = os.environ.get('DATABASE_PUBLIC_URL')
db_config = dj_database_url.parse(DATABASE_URL)
DATABASES = {
"default": {
#"ENGINE": "django.db.backends.sqlite3",
#"NAME": BASE_DIR / "db.sqlite3",
"ENGINE": 'django.db.backends.postgresql',
"NAME": db_config['NAME'],
"USER": db_config['USER'],
"PASSWORD": db_config['PASSWORD'],
"HOST": db_config['HOST'],
"PORT": db_config['PORT'],
}
}
#Secret key configuration
SECRET_KEY = SECRET_KEY
the following is my .env of course not using realdata
DB_PASSWORD_ME=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DATABASE_PUBLIC_URL=postgresql://postgres:xxxxxxxxxxxxxxxxxx@xxxxxxxxxxxxx.proxy.rlwy.net:34833/railway
NAME=xxxxxxx
USER=postgres
PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HOST=postgres.railway.internal
PORT=5432
#my secret key
SECRET_KEY=xxxxx-xxxxx-C(xxxxxx)xxxxxxxxxxxxxxxxxxxx
Thanks.... the attached file is the last log i have.
Attachments
10 months ago
Well, I am not so sure what a service variable is. According to this: A service variable typically refers to a configuration setting or environment variable that is managed and provided by a service, such as a cloud provider. In that case, yes, I am using DATABASE_URL, which is provided by Railway = DATABASE_PUBLIC_URL"
10 months ago
@snapshot:4df43b36-9c6d-449d-8bcb-f0b754be5f44