fixes/updates. use pydata theme. use drawio extension in devcontainer

This commit is contained in:
len0rd 2023-05-27 23:41:55 -04:00
parent 67fd3d91af
commit 4285425051
6 changed files with 45 additions and 38 deletions

View file

@ -1,25 +1,29 @@
FROM node:14-alpine
FROM python:3.11-bullseye
# Create app directory
WORKDIR /usr/src/app
ADD pip-requirements.txt /tmp/pip-requirements.txt
RUN pip install -r /tmp/pip-requirements.txt \
&& rm /tmp/pip-requirements.txt
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
RUN apk add --no-cache python3 bash \
&& ln -sf python3 /usr/bin/python
# install drawio for doc diagram gen
ENV DRAWIO_VERSION "21.1.2"
RUN apt update \
&& apt install -yq --no-install-recommends \
xvfb \
wget \
libnotify4 \
libgbm1 \
libasound2 \
libxss1 \
libsecret-1-0 \
&& wget https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/drawio-amd64-${DRAWIO_VERSION}.deb \
&& apt install -y ./drawio-amd64-${DRAWIO_VERSION}.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf drawio-amd64-${DRAWIO_VERSION}.deb
ENV XVFB_DISPLAY ":42"
# Bundle app source
COPY . .
RUN python3 -m ensurepip \
&& pip3 install --no-cache --upgrade pip setuptools \
&& pip3 install -r pip-requirements.txt
# COPY . .
# RUN ablog build
EXPOSE 8090
CMD [ "npm", "start" ]
CMD [ "ablog", "serve", "-p", "8090" ]