Compare commits
No commits in common. "fea610797d38d847877562ca4897af8a78c84f91" and "df5b7430cc9d19151cfb445ab334c19c2cfcc3b3" have entirely different histories.
fea610797d
...
df5b7430cc
@ -1,12 +1,17 @@
|
||||
*
|
||||
!.babelrc
|
||||
!*.json
|
||||
!*.html
|
||||
!*.js
|
||||
!*.sh
|
||||
!*.md
|
||||
!config
|
||||
!db
|
||||
!docker-compose.yml
|
||||
!Dockerfile
|
||||
!entrypoint.sh
|
||||
!face.js
|
||||
!frontend
|
||||
!package.json
|
||||
!package-lock.json
|
||||
!password.js
|
||||
!query.sh
|
||||
!README.md
|
||||
!reset-db.sh
|
||||
!server
|
||||
!scanner
|
||||
!src
|
||||
@ -14,10 +19,6 @@
|
||||
!ketrface
|
||||
!client
|
||||
!scripts
|
||||
!Dockerfile
|
||||
!entrypoint.sh
|
||||
node_modules
|
||||
frontend/bower_modules
|
||||
client/node_modules
|
||||
server/node_modules
|
||||
|
||||
|
80
Dockerfile
80
Dockerfile
@ -1,58 +1,10 @@
|
||||
ARG DEVELOPMENT=
|
||||
|
||||
FROM ubuntu:jammy AS base
|
||||
FROM ubuntu:jammy
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=NONINTERACTIVE apt-get upgrade -y
|
||||
|
||||
RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||
wget
|
||||
|
||||
# Upgrade Node
|
||||
RUN wget -qO- https://deb.nodesource.com/setup_18.x | bash -
|
||||
|
||||
RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||
nodejs
|
||||
|
||||
# Install the latest npm and npx
|
||||
RUN npm install --global npm@latest
|
||||
|
||||
FROM base AS production
|
||||
|
||||
RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||
git
|
||||
|
||||
WORKDIR /website
|
||||
COPY /*.json /website/
|
||||
RUN npm upgrade && npm install
|
||||
COPY /.babelrc /*.html /*.js /website/
|
||||
COPY /src /website/src
|
||||
COPY /frontend /website/frontend
|
||||
RUN npm run build
|
||||
RUN ls -altr /website
|
||||
|
||||
WORKDIR /website/client
|
||||
COPY /client/*.json /website/client/
|
||||
RUN npm upgrade && npm install
|
||||
COPY /client/*.js /website/client/
|
||||
COPY /client/public /website/client/public
|
||||
COPY /client/src /website/client/src
|
||||
RUN npm run build
|
||||
RUN ls -altr /website/client
|
||||
|
||||
RUN echo $DEVELOPMENT
|
||||
|
||||
FROM base AS runtime1
|
||||
ONBUILD COPY --from=production /website/dist /website/dist
|
||||
ONBUILD COPY --from=production /website/*.html /website/
|
||||
ONBUILD COPY --from=production /website/client/*.html /website/client/
|
||||
ONBUILD COPY --from=production /website/client/dist /website/client/dist
|
||||
|
||||
FROM base AS runtime
|
||||
|
||||
FROM runtime${DEVELOPMENT}
|
||||
|
||||
RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||
wget \
|
||||
pip \
|
||||
libgl1 \
|
||||
libglib2.0-0 \
|
||||
@ -60,9 +12,15 @@ RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||
rsync \
|
||||
less \
|
||||
git \
|
||||
sqlite3 \
|
||||
sqlite3
|
||||
|
||||
# Upgrade Node
|
||||
RUN wget -qO- https://deb.nodesource.com/setup_18.x | bash -
|
||||
|
||||
RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||
python2 \
|
||||
jhead \
|
||||
nodejs \
|
||||
jq \
|
||||
nano \
|
||||
shellinabox \
|
||||
@ -70,6 +28,9 @@ RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||
curl \
|
||||
less
|
||||
|
||||
# Install the latest npm and npx
|
||||
RUN npm install --global npm@latest
|
||||
|
||||
# Install deepface
|
||||
RUN pip install deepface
|
||||
RUN pip install piexif
|
||||
@ -78,16 +39,31 @@ RUN pip install piexif
|
||||
# install <1.24
|
||||
RUN pip install "numpy<1.24"
|
||||
|
||||
COPY /package*json /website/
|
||||
|
||||
WORKDIR /website
|
||||
RUN npm upgrade && npm install
|
||||
|
||||
WORKDIR /website/client
|
||||
COPY /client/package*json /website/client/
|
||||
RUN npm upgrade && npm install
|
||||
COPY /server /website/server
|
||||
|
||||
WORKDIR /website/server
|
||||
RUN npm install
|
||||
RUN npm upgrade && npm install
|
||||
|
||||
COPY /config/default.json /website/config/default.json
|
||||
COPY /*js /website/
|
||||
COPY /src /website/src
|
||||
COPY /client /website/client
|
||||
COPY /scanner /website/scanner
|
||||
COPY /frontend /website/frontend
|
||||
COPY /ketrface /website/ketrface
|
||||
|
||||
# Switch to bash instead of sh
|
||||
SHELL [ "/bin/bash", "-c" ]
|
||||
|
||||
ARG DEVELOPMENT=
|
||||
RUN cp /website/server/nginx.conf /etc/nginx/sites-enabled/default
|
||||
|
||||
# If not DEVELOPMENT mode, copy production config, else development
|
||||
|
Loading…
x
Reference in New Issue
Block a user