Skip to content

Commit

Permalink
Update multidocker PM2 basis
Browse files Browse the repository at this point in the history
cpp-image-analysis can no longer compile entirely from code as some external code sources have changed their repository structure to be fee-based or sign-in based.  Installing Boost, etc, from repo still works, however, so reworked pm2 base to be ubuntu instead of alpine.
  • Loading branch information
nmoschkin committed Jan 19, 2025
1 parent bb20ed1 commit 7899b9d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion multidocker/contexts/bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM datacore/pm2-discord as development
RUN apk add python3 build-base sqlite
RUN apt-get install -y sqlite
RUN mkdir /app
WORKDIR /app
COPY --from=source package.json package-lock.json ./
Expand Down
9 changes: 5 additions & 4 deletions multidocker/contexts/cpp-image-analysis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:20.04
FROM datacore/pm2-discord as development
#FROM ubuntu:20.04

ENV LANG=C.UTF-8

Expand Down Expand Up @@ -46,6 +47,6 @@ RUN make -j$(nproc)
WORKDIR /usr/src/dcimageanalysis/build
CMD ./imserver --jsonpath=/sitebuild/structured/ --trainpath=$CPP_TRAIN_PATH --datapath=$CPP_DATA_PATH --asseturl=$ASSETS_URL

# FROM development as production
#RUN pm2 set pm2-discord-webhook:process_name imageAnalysis
#CMD pm2-runtime start "./imserver --jsonpath=/sitebuild/structured/ --trainpath=$CPP_TRAIN_PATH --datapath=$CPP_DATA_PATH --asseturl=$ASSETS_URL" --name "imageAnalysis"
FROM development as production
RUN pm2 set pm2-discord-webhook:process_name imageAnalysis
CMD pm2-runtime start "./imserver --jsonpath=/sitebuild/structured/ --trainpath=$CPP_TRAIN_PATH --datapath=$CPP_DATA_PATH --asseturl=$ASSETS_URL" --name "imageAnalysis"
33 changes: 30 additions & 3 deletions multidocker/contexts/pm2-discord/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
ARG ALPINE_VERSION
ARG NODE_VERSION
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION}
FROM ubuntu:20.04

RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
apt-transport-https \
software-properties-common \
wget \
unzip \
curl \
ca-certificates \
build-essential \
checkinstall \
cmake \
pkg-config \
yasm \
git \
nano \
cron \
dialog \
net-tools \
openssl \
libssl-dev

RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10

ARG node_version=v18.20.2
RUN cd /opt \
&& curl -LO https://nodejs.org/dist/${node_version}/node-${node_version}-linux-x64.tar.xz \
&& tar xJf node-${node_version}-linux-x64.tar.xz \
&& rm node-${node_version}-linux-x64.tar.xz
ENV PATH=/opt/node-${node_version}-linux-x64/bin:${PATH}

COPY discord-setup.sh .

Expand Down

0 comments on commit 7899b9d

Please sign in to comment.