add dockerignore and get MESH_VER from settings.py

This commit is contained in:
Josh 2020-11-29 04:26:53 +00:00
parent 216f7a38cf
commit 156c0fe7f6
6 changed files with 15 additions and 5 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
.git
.cache
**/*.env
**/env
**/node_modules

View File

@ -19,7 +19,7 @@ FROM nginx:stable-alpine
ENV PUBLIC_DIR /usr/share/nginx/html
RUN apk add --no-cache bash
SHELL ["/bin/bash", "-c"]
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
COPY --from=builder /home/node/app/dist/ ${PUBLIC_DIR}

View File

@ -6,9 +6,12 @@ ENV TACTICAL_DIR /opt/tactical
RUN apk add --no-cache bash
SHELL ["/bin/bash", "-c"]
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
RUN npm install meshcentral@0.6.84
COPY api/tacticalrmm/tacticalrmm/settings.py /tmp/settings.py
RUN grep -o 'MESH_VER.*' /tmp/settings.py | cut -d'"' -f 2 > /tmp/MESH_VER && \
npm install meshcentral@$(cat /tmp/MESH_VER)
COPY docker/containers/tactical-meshcentral/entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -5,7 +5,7 @@ ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready
RUN apk add --no-cache inotify-tools supervisor bash
SHELL ["/bin/bash", "-c"]
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
COPY docker/containers/tactical-nats/entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -4,7 +4,7 @@ ENV TACTICAL_DIR /opt/tactical
RUN apk add --no-cache openssl bash
SHELL ["/bin/bash", "-c"]
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
COPY docker/containers/tactical-nginx/entrypoint.sh /docker-entrypoint.d/
RUN chmod +x /docker-entrypoint.d/entrypoint.sh

View File

@ -4,6 +4,8 @@ ENV TACTICAL_DIR /opt/tactical
ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready
ENV SALT_USER saltapi
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
RUN apt-get update && \
apt-get install -y ca-certificates wget gnupg2 tzdata supervisor && \
wget -O - https://repo.saltstack.com/py3/ubuntu/20.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add - && \