Add hivemind to Containerfile (#20457)
* Add overmind to Containerfile * Allow dynamic system architecture * Add hivemind to bin/startup * Remove redundant NODE in devcontainer * Fix bug * Refactor * Update check hivemind script
This commit is contained in:
parent
8928d86982
commit
350182d53f
3 changed files with 15 additions and 13 deletions
|
|
@ -179,16 +179,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|||
libpq-dev \
|
||||
postgresql-client
|
||||
|
||||
ARG NODE_MAJOR
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
--mount=type=tmpfs,target=/var/log \
|
||||
mkdir -p -- /etc/apt/keyrings \
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq --no-install-recommends \
|
||||
nodejs
|
||||
|
||||
# Application dependencies, for Cypress, node-canvas
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
|
|
@ -198,6 +188,15 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|||
libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb \
|
||||
libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
|
||||
|
||||
# Installing hivemind
|
||||
ARG TARGETARCH
|
||||
ENV HIVEMIND_VERSION=v1.1.0
|
||||
ADD https://github.com/DarthSim/hivemind/releases/download/${HIVEMIND_VERSION}/hivemind-${HIVEMIND_VERSION}-linux-${TARGETARCH}.gz /tmp/hivemind.gz
|
||||
RUN gunzip /tmp/hivemind.gz && \
|
||||
chmod +x /tmp/hivemind && \
|
||||
mv /tmp/hivemind /usr/local/bin/hivemind && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
# Configure bundler
|
||||
ENV LANG=C.UTF-8 \
|
||||
BUNDLE_JOBS=4 \
|
||||
|
|
|
|||
|
|
@ -14,5 +14,10 @@ chdir APP_ROOT do
|
|||
puts "== STARTING UP =="
|
||||
# Foreman .env load behavior is at odds with dotenv
|
||||
# https://github.com/ddollar/foreman/issues/702#issuecomment-1227334155
|
||||
system! "foreman start -f Procfile.dev --env=/dev/null"
|
||||
|
||||
if system("which hivemind > /dev/null")
|
||||
system! "hivemind Procfile.dev"
|
||||
else
|
||||
system! "foreman start -f Procfile.dev --env=/dev/null"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ x-app: &app
|
|||
context: .
|
||||
args:
|
||||
PG_MAJOR: '13'
|
||||
NODE_MAJOR: '16'
|
||||
YARN_VERSION: '1.22.18'
|
||||
image: ghcr.io/forem/forem:development
|
||||
environment: &env
|
||||
NODE_ENV: ${NODE_ENV:-development}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue