Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,919 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My app has been deployed using a Github repository as the source. When I click the link to see my app deployed live on the internet I see this: "Your app service is up and running. Time to take the next step and deploy your code" (Also see picture below). How do I correctly deploy a flask app with a database to azure?
I can see in the log the requirements.txt file installs all requirements, but the "flask db init", "flask db migrate", or "flask db upgrade" do not appear to be run from the yml file.
Run logs "Running oryx build.."
Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.12 -p virtualenv_name=antenv --log-file /tmp/build-debug.log -i /tmp/8dcaf455204d927 --compress-destination-dir | tee /tmp/oryx-build.log
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20240424.1, Commit: d37b2225a252ab2c04b4726024d047cf01ea1318, ReleaseTagName: 20240424.1
Build Operation ID: d163db461b79007a
Repository Commit : 678eed50-8a46-46d4-ae4f-da8bcc665d68
OS Type : bullseye
Image Type : githubactions
Detecting platforms...
Detected following platforms:
python: 3.12.2
Version '3.12.2' of platform 'python' is not installed. Generating script to install it...
Using intermediate directory '/tmp/8dcaf455204d927'.
Copying files to the intermediate directory...
Done in 5 sec(s).
Source directory : /tmp/8dcaf455204d927
Destination directory: /home/site/wwwroot
Downloading and extracting 'python' version '3.12.2' to '/tmp/oryx/platforms/python/3.12.2'...
Detected image debian flavor: bullseye.
Downloaded in 12 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: python...
Done in 40 sec(s).
image detector file exists, platform is python..
OS detector file exists, OS is bullseye..
Python Version: /tmp/oryx/platforms/python/3.12.2/bin/python3.12
Creating directory for command manifest file if it does not exist
Removing existing manifest file
Python Virtual Environment: antenv
Creating virtual environment...
Activating virtual environment...
Running pip install...
[20:40:19+0000] Collecting alembic==1.13.2 (from -r requirements.txt (line 1))
[20:40:19+0000] Downloading alembic-1.13.2-py3-none-any.whl.metadata (7.4 kB)
[20:40:19+0000] Collecting bcrypt==4.1.3 (from -r requirements.txt (line 2))
[20:40:19+0000] Downloading bcrypt-4.1.3-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (9.5 kB)
[20:40:19+0000] Collecting blinker==1.8.2 (from -r requirements.txt (line 3))
[20:40:19+0000] Downloading blinker-1.8.2-py3-none-any.whl.metadata (1.6 kB)
[20:40:20+0000] Collecting certifi==2024.7.4 (from -r requirements.txt (line 4))
[20:40:20+0000] Downloading certifi-2024.7.4-py3-none-any.whl.metadata (2.2 kB)
[20:40:20+0000] Collecting charset-normalizer==2.0.12 (from -r requirements.txt (line 5))
[20:40:20+0000] Downloading charset_normalizer-2.0.12-py3-none-any.whl.metadata (11 kB)
[20:40:20+0000] Collecting click==8.1.7 (from -r requirements.txt (line 6))
[20:40:20+0000] Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
[20:40:20+0000] Collecting colorama==0.4.6 (from -r requirements.txt (line 7))
[20:40:20+0000] Downloading colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
[20:40:21+0000] Collecting Flask==3.0.3 (from -r requirements.txt (line 8))
[20:40:21+0000] Downloading flask-3.0.3-py3-none-any.whl.metadata (3.2 kB)
[20:40:21+0000] Collecting Flask-Bcrypt==1.0.1 (from -r requirements.txt (line 9))
[20:40:21+0000] Downloading Flask_Bcrypt-1.0.1-py3-none-any.whl.metadata (2.6 kB)
[20:40:21+0000] Collecting Flask-Login==0.6.3 (from -r requirements.txt (line 10))
[20:40:21+0000] Downloading Flask_Login-0.6.3-py3-none-any.whl.metadata (5.8 kB)
[20:40:21+0000] Collecting Flask-Migrate==4.0.7 (from -r requirements.txt (line 11))
[20:40:21+0000] Downloading Flask_Migrate-4.0.7-py3-none-any.whl.metadata (3.1 kB)
[20:40:22+0000] Collecting Flask-SQLAlchemy==3.1.1 (from -r requirements.txt (line 12))
[20:40:22+0000] Downloading flask_sqlalchemy-3.1.1-py3-none-any.whl.metadata (3.4 kB)
[20:40:23+0000] Collecting greenlet==3.0.3 (from -r requirements.txt (line 13))
[20:40:23+0000] Downloading greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (3.8 kB)
[20:40:23+0000] Collecting gunicorn==22.0.0 (from -r requirements.txt (line 14))
[20:40:23+0000] Downloading gunicorn-22.0.0-py3-none-any.whl.metadata (4.4 kB)
[20:40:23+0000] Collecting idna==3.7 (from -r requirements.txt (line 15))
[20:40:23+0000] Downloading idna-3.7-py3-none-any.whl.metadata (9.9 kB)
[20:40:23+0000] Collecting importlib_metadata==8.0.0 (from -r requirements.txt (line 16))
[20:40:23+0000] Downloading importlib_metadata-8.0.0-py3-none-any.whl.metadata (4.6 kB)
[20:40:24+0000] Collecting itsdangerous==2.2.0 (from -r requirements.txt (line 17))
[20:40:24+0000] Downloading itsdangerous-2.2.0-py3-none-any.whl.metadata (1.9 kB)
[20:40:24+0000] Collecting Jinja2==3.1.4 (from -r requirements.txt (line 18))
[20:40:24+0000] Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
[20:40:24+0000] Collecting Mako==1.3.5 (from -r requirements.txt (line 19))
[20:40:24+0000] Downloading Mako-1.3.5-py3-none-any.whl.metadata (2.9 kB)
[20:40:24+0000] Collecting MarkupSafe==2.1.5 (from -r requirements.txt (line 20))
[20:40:24+0000] Downloading MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.0 kB)
[20:40:25+0000] Collecting packaging==24.1 (from -r requirements.txt (line 21))
[20:40:25+0000] Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
[20:40:26+0000] Collecting requests==2.26.0 (from -r requirements.txt (line 22))
[20:40:26+0000] Downloading requests-2.26.0-py2.py3-none-any.whl.metadata (4.8 kB)
[20:40:28+0000] Collecting SQLAlchemy==2.0.31 (from -r requirements.txt (line 23))
[20:40:28+0000] Downloading SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.6 kB)
[20:40:28+0000] Collecting typing_extensions==4.12.2 (from -r requirements.txt (line 24))
[20:40:28+0000] Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
[20:40:28+0000] Collecting urllib3==1.26.19 (from -r requirements.txt (line 25))
[20:40:28+0000] Downloading urllib3-1.26.19-py2.py3-none-any.whl.metadata (49 kB)
[20:40:28+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.3/49.3 kB 906.1 kB/s eta 0:00:00
[20:40:28+0000] Collecting Werkzeug==3.0.3 (from -r requirements.txt (line 26))
[20:40:28+0000] Downloading werkzeug-3.0.3-py3-none-any.whl.metadata (3.7 kB)
[20:40:29+0000] Collecting zipp==3.19.2 (from -r requirements.txt (line 27))
[20:40:29+0000] Downloading zipp-3.19.2-py3-none-any.whl.metadata (3.6 kB)
[20:40:30+0000] Downloading alembic-1.13.2-py3-none-any.whl (232 kB)
[20:40:30+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 233.0/233.0 kB 929.7 kB/s eta 0:00:00
[20:40:30+0000] Downloading bcrypt-4.1.3-cp39-abi3-manylinux_2_28_x86_64.whl (283 kB)
[20:40:30+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 283.7/283.7 kB 7.0 MB/s eta 0:00:00
[20:40:30+0000] Downloading blinker-1.8.2-py3-none-any.whl (9.5 kB)
[20:40:30+0000] Downloading certifi-2024.7.4-py3-none-any.whl (162 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.0/163.0 kB 4.9 MB/s eta 0:00:00
[20:40:31+0000] Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
[20:40:31+0000] Downloading click-8.1.7-py3-none-any.whl (97 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 2.8 MB/s eta 0:00:00
[20:40:31+0000] Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
[20:40:31+0000] Downloading flask-3.0.3-py3-none-any.whl (101 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.7/101.7 kB 3.9 MB/s eta 0:00:00
[20:40:31+0000] Downloading Flask_Bcrypt-1.0.1-py3-none-any.whl (6.0 kB)
[20:40:31+0000] Downloading Flask_Login-0.6.3-py3-none-any.whl (17 kB)
[20:40:31+0000] Downloading Flask_Migrate-4.0.7-py3-none-any.whl (21 kB)
[20:40:31+0000] Downloading flask_sqlalchemy-3.1.1-py3-none-any.whl (25 kB)
[20:40:31+0000] Downloading greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (625 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 625.7/625.7 kB 9.2 MB/s eta 0:00:00
[20:40:31+0000] Downloading gunicorn-22.0.0-py3-none-any.whl (84 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.4/84.4 kB 1.9 MB/s eta 0:00:00
[20:40:31+0000] Downloading idna-3.7-py3-none-any.whl (66 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 2.6 MB/s eta 0:00:00
[20:40:31+0000] Downloading importlib_metadata-8.0.0-py3-none-any.whl (24 kB)
[20:40:31+0000] Downloading itsdangerous-2.2.0-py3-none-any.whl (16 kB)
[20:40:31+0000] Downloading jinja2-3.1.4-py3-none-any.whl (133 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 4.2 MB/s eta 0:00:00
[20:40:31+0000] Downloading Mako-1.3.5-py3-none-any.whl (78 kB)
[20:40:31+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.6/78.6 kB 3.6 MB/s eta 0:00:00
[20:40:32+0000] Downloading MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)
[20:40:32+0000] Downloading packaging-24.1-py3-none-any.whl (53 kB)
[20:40:32+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB 1.6 MB/s eta 0:00:00
[20:40:32+0000] Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
[20:40:32+0000] ━━━━━━━━━━━━��━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.3/62.3 kB 2.2 MB/s eta 0:00:00
[20:40:32+0000] Downloading SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
[20:40:32+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 28.0 MB/s eta 0:00:00
[20:40:32+0000] Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
[20:40:32+0000] Downloading urllib3-1.26.19-py2.py3-none-any.whl (143 kB)
[20:40:32+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.9/143.9 kB 5.3 MB/s eta 0:00:00
[20:40:32+0000] Downloading werkzeug-3.0.3-py3-none-any.whl (227 kB)
[20:40:32+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 227.3/227.3 kB 6.7 MB/s eta 0:00:00
[20:40:32+0000] Downloading zipp-3.19.2-py3-none-any.whl (9.0 kB)
[20:40:33+0000] Installing collected packages: zipp, urllib3, typing_extensions, packaging, MarkupSafe, itsdangerous, idna, greenlet, colorama, click, charset-normalizer, certifi, blinker, bcrypt, Werkzeug, SQLAlchemy, requests, Mako, Jinja2, importlib_metadata, gunicorn, Flask, alembic, Flask-SQLAlchemy, Flask-Login, Flask-Bcrypt, Flask-Migrate
[20:40:51+0000] Successfully installed Flask-3.0.3 Flask-Bcrypt-1.0.1 Flask-Login-0.6.3 Flask-Migrate-4.0.7 Flask-SQLAlchemy-3.1.1 Jinja2-3.1.4 Mako-1.3.5 MarkupSafe-2.1.5 SQLAlchemy-2.0.31 Werkzeug-3.0.3 alembic-1.13.2 bcrypt-4.1.3 blinker-1.8.2 certifi-2024.7.4 charset-normalizer-2.0.12 click-8.1.7 colorama-0.4.6 greenlet-3.0.3 gunicorn-22.0.0 idna-3.7 importlib_metadata-8.0.0 itsdangerous-2.2.0 packaging-24.1 requests-2.26.0 typing_extensions-4.12.2 urllib3-1.26.19 zipp-3.19.2
[notice] A new release of pip is available: 24.0 -> 24.1.2
[notice] To update, run: pip install --upgrade pip
Not a vso image, so not writing build commands
Preparing output...
Copying files to destination directory '/tmp/_preCompressedDestinationDir'...
Done in 23 sec(s).
Compressing content of directory '/tmp/_preCompressedDestinationDir'...
Copied the compressed output to '/home/site/wwwroot'
Removing existing manifest file
Creating a manifest file...
Manifest file created.
Copying .ostype to manifest output directory.
Done in 214 sec(s).