Closed pgyogesh closed 8 months ago
I'm trying to run this app using docker. Initially, It was failing with below error:
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/home/pgyogesh/.local/lib/python3.9/site-packages/werkzeug/urls.py)
Then I added werkzeug==2.2.2 in requirements.txt
werkzeug==2.2.2
I was able to docker compose successfully but page is not loading correctly. (Attaching screenshot)
sudo docker-compose up -d sudo docker-compose run web flask db upgrade Password: [+] Building 2.9s (13/13) FINISHED => [web internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [web internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 458B 0.0s => [web internal] load metadata for docker.io/library/python:3-alpine 2.8s => [web auth] library/python:pull token for registry-1.docker.io 0.0s => [web 1/7] FROM docker.io/library/python:3-alpine@sha256:c793b92fd9e0e2a0b611756788a033d569ca864b733461c8fb30cfd14847dbcf 0.0s => [web internal] load build context 0.0s => => transferring context: 6.44kB 0.0s => CACHED [web 2/7] RUN mkdir /app 0.0s => CACHED [web 3/7] WORKDIR /app 0.0s => CACHED [web 4/7] COPY requirements.txt /app/ 0.0s => CACHED [web 5/7] RUN apk add --no-cache postgresql-libs && apk add --no-cache --virtual .build-deps gcc g++ musl-dev postgresql-dev && pip install --upgrade pip 0.0s => CACHED [web 6/7] RUN pip install -r requirements.txt 0.0s => CACHED [web 7/7] ADD . /app 0.0s => [web] exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:d8b43e1d069b5c96ce71a1001910be429a704abd613326eff65c38bfeb48fe64 0.0s => => naming to docker.io/library/explaindalibocom-web 0.0s [+] Running 3/3 ✔ Network explaindalibocom_default Created 0.0s ✔ Container explaindalibocom-postgres-1 Started 0.3s ✔ Container explaindalibocom-web-1 Started 0.5s [+] Creating 1/0 ✔ Container explaindalibocom-postgres-1 Running 0.0s INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL.
It is fixed by running. I was thinking it is not required in case of docker.
npm run dev
I'm trying to run this app using docker. Initially, It was failing with below error:
Then I added
werkzeug==2.2.2
in requirements.txtI was able to docker compose successfully but page is not loading correctly. (Attaching screenshot)