Spaces:
Sleeping
Sleeping
Move node_modules installation in Dockerfile and add npx playwright install (fixes 8544a132013d00741e8d63c99d48e6da42236f88)
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -21,6 +21,12 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
|
| 21 |
xargs apt-get -y install < packages.txt && \
|
| 22 |
npm install -g npm
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
# Give app permissions to 'user' (non-root)
|
| 25 |
RUN chown user:user .
|
| 26 |
|
|
@@ -42,10 +48,6 @@ USER user
|
|
| 42 |
COPY --chown=user requirements.txt requirements.txt
|
| 43 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 44 |
|
| 45 |
-
# Install package-lock.json
|
| 46 |
-
COPY --chown=user package.json package-lock.json ./
|
| 47 |
-
RUN npm install
|
| 48 |
-
|
| 49 |
# Copy nginx configuration
|
| 50 |
COPY --chown=user nginx.conf /etc/nginx/sites-available/default
|
| 51 |
|
|
|
|
| 21 |
xargs apt-get -y install < packages.txt && \
|
| 22 |
npm install -g npm
|
| 23 |
|
| 24 |
+
# Install package-lock.json
|
| 25 |
+
COPY --chown=user package.json package-lock.json ./
|
| 26 |
+
RUN npm install
|
| 27 |
+
RUN npx playwright install
|
| 28 |
+
RUN chown -R user:user "$HOME/app/node_modules"
|
| 29 |
+
|
| 30 |
# Give app permissions to 'user' (non-root)
|
| 31 |
RUN chown user:user .
|
| 32 |
|
|
|
|
| 48 |
COPY --chown=user requirements.txt requirements.txt
|
| 49 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
# Copy nginx configuration
|
| 52 |
COPY --chown=user nginx.conf /etc/nginx/sites-available/default
|
| 53 |
|