feat: simplify dockerfile to use the frontend makefile
This commit is contained in:
parent
0867b13f8f
commit
3c3a1485e7
1 changed files with 2 additions and 8 deletions
10
Dockerfile
10
Dockerfile
|
@ -35,7 +35,7 @@ RUN curl -fsSL https://get.opentofu.org/opentofu.gpg -o opentofu.gpg && \
|
|||
rm -rf opentofu.tar.gz opentofu.tar.gz.gpgsig opentofu.gpg /tmp/* /var/tmp/*
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y curl sudo && \
|
||||
apt-get install --no-install-recommends -y curl sudo make && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
@ -55,11 +55,5 @@ RUN python3 -m venv ${APP_BASE}/env && \
|
|||
${APP_BASE}/env/bin/pip install --no-cache-dir -r requirements.txt && \
|
||||
${APP_BASE}/env/bin/pip install --no-cache-dir psycopg2-binary gunicorn
|
||||
|
||||
RUN rm -rf frontend && \
|
||||
git clone https://gitlab.com/guardianproject-ops/bypass-censorship/portal-frontend.git frontend && \
|
||||
cd frontend && npm install && npm run build && \
|
||||
mkdir -p ${APP_BASE}/${APP}/app/static/ui && \
|
||||
cp -r dist/* ${APP_BASE}/${APP}/app/static/ui && \
|
||||
rm -rf frontend /tmp/* /var/tmp/*
|
||||
|
||||
RUN make install-frontend
|
||||
ENTRYPOINT ["./run_gunicorn.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue