Dockerfile updates
This commit is contained in:
parent
842dd95e43
commit
6dc4cfd3cc
21 changed files with 74 additions and 63 deletions
|
|
@ -1,4 +1,4 @@
|
|||
image: node:18-bullseye-slim
|
||||
image: node:20-bullseye-slim
|
||||
|
||||
include:
|
||||
- /apps/leafcutter/.gitlab-ci.yml
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -58,13 +58,6 @@ setup-signal:
|
|||
create-admin-user:
|
||||
docker exec -i $(shell docker ps -aqf "name=metamigo-postgresql") bash < ./scripts/create-admin-user.sh
|
||||
|
||||
force-run-migrations:
|
||||
docker-compose -p link-docker-compose exec zammad-railsserver bundle exec rails r 'require "/opt/zammad/db/addon/cdr_signal/20210525091356_cdr_signal_channel.rb";require "/opt/zammad/db/addon/cdr_voice/20210525091357_cdr_voice_channel.rb";require "/opt/zammad/db/addon/cdr_whatsapp/20210525091358_cdr_whatsapp_channel.rb"; require "/opt/zammad/db/addon/pgpsupport/20220403000001_pgpsupport.rb";CdrSignalChannel.new.up;CdrVoiceChannel.new.up;CdrWhatsappChannel.new.up;PGPSupport.new.up;'
|
||||
|
||||
sso:
|
||||
docker-compose exec zammad-nginx sed -i '/proxy_set_header X-Forwarded-User "";/d' /opt/zammad/contrib/nginx/zammad.conf;
|
||||
docker-compose exec zammad-nginx service nginx restart;
|
||||
|
||||
start:
|
||||
CURRENT_UID=$(CURRENT_UID) docker-compose up -d
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:18-bullseye-slim as builder
|
||||
FROM node:20-bullseye-slim as builder
|
||||
LABEL maintainer="Darren Clarke <darren@redaranj.com>"
|
||||
ARG APP_DIR=/opt/leafcutter
|
||||
RUN mkdir -p ${APP_DIR}/
|
||||
|
|
@ -10,7 +10,7 @@ ENV NEXT_PUBLIC_NEXTAUTH_URL https://lc.digiresilience.org
|
|||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM node:18-bullseye-slim
|
||||
FROM node:20-bullseye-slim
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL maintainer="Darren Clarke <darren@redaranj.com>"
|
||||
|
|
|
|||
|
|
@ -1,37 +1,49 @@
|
|||
FROM node:18-bullseye-slim as builder
|
||||
LABEL maintainer="Darren Clarke <darren@redaranj.com>"
|
||||
|
||||
FROM node:20 AS base
|
||||
|
||||
FROM base AS builder
|
||||
ARG APP_DIR=/opt/link
|
||||
RUN mkdir -p ${APP_DIR}/
|
||||
COPY . ${APP_DIR}/
|
||||
RUN chown -R node ${APP_DIR}/
|
||||
USER node
|
||||
RUN npm i -g turbo
|
||||
WORKDIR ${APP_DIR}
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
COPY . .
|
||||
RUN turbo prune --scope=link --docker
|
||||
|
||||
FROM node:18-bullseye-slim
|
||||
FROM base AS installer
|
||||
ARG APP_DIR=/opt/link
|
||||
WORKDIR ${APP_DIR}
|
||||
COPY .gitignore .gitignore
|
||||
COPY --from=builder ${APP_DIR}/out/json/ .
|
||||
COPY --from=builder ${APP_DIR}/out/package-lock.json ./package-lock.json
|
||||
RUN npm install
|
||||
|
||||
COPY --from=builder ${APP_DIR}/out/full/ .
|
||||
RUN npm i -g turbo
|
||||
RUN turbo run build --filter=link
|
||||
|
||||
FROM base AS runner
|
||||
ARG APP_DIR=/opt/link
|
||||
WORKDIR ${APP_DIR}/
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL maintainer="Darren Clarke <darren@redaranj.com>"
|
||||
LABEL org.label-schema.build-date=$BUILD_DATE
|
||||
LABEL org.label-schema.version=$VERSION
|
||||
ARG APP_DIR=/opt/link
|
||||
ENV APP_DIR ${APP_DIR}
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
dumb-init
|
||||
RUN mkdir -p ${APP_DIR}
|
||||
RUN chown -R node ${APP_DIR}/
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
USER node
|
||||
WORKDIR ${APP_DIR}
|
||||
COPY --from=builder ${APP_DIR}/node_modules ./node_modules
|
||||
COPY --from=builder ${APP_DIR}/.next ./.next
|
||||
COPY --from=builder ${APP_DIR}/next.config.js ./next.config.js
|
||||
COPY --from=installer ${APP_DIR}/node_modules/ ./node_modules/
|
||||
COPY --from=installer ${APP_DIR}/apps/link/ ./apps/link/
|
||||
USER root
|
||||
RUN chmod +x ./apps/link/docker-entrypoint.sh
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
ENV PORT 3000
|
||||
ENV NODE_ENV production
|
||||
COPY package.json ./
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
ENTRYPOINT ["./apps/link/docker-entrypoint.sh"]
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@
|
|||
set -e
|
||||
|
||||
cd ${APP_DIR}
|
||||
echo "starting shell app"
|
||||
echo "starting link"
|
||||
exec dumb-init npm run start
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:18-bullseye as builder
|
||||
FROM node:20-bullseye as builder
|
||||
|
||||
ARG METAMIGO_DIR=/opt/metamigo
|
||||
RUN mkdir -p ${METAMIGO_DIR}/
|
||||
|
|
@ -11,14 +11,14 @@ RUN npm run build
|
|||
|
||||
RUN rm -Rf ./node_modules
|
||||
|
||||
FROM node:18-bullseye as clean
|
||||
FROM node:20-bullseye as clean
|
||||
ARG METAMIGO_DIR=/opt/metamigo
|
||||
|
||||
COPY --from=builder ${METAMIGO_DIR} ${METAMIGO_DIR}/
|
||||
|
||||
RUN rm -Rf ./node_modules
|
||||
|
||||
FROM node:18-bullseye as pristine
|
||||
FROM node:20-bullseye as pristine
|
||||
LABEL maintainer="Abel Luck <abel@guardianproject.info>"
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:18-bullseye as builder
|
||||
FROM node:20-bullseye as builder
|
||||
|
||||
ARG METAMIGO_DIR=/opt/metamigo
|
||||
RUN mkdir -p ${METAMIGO_DIR}/
|
||||
|
|
@ -6,20 +6,20 @@ WORKDIR ${METAMIGO_DIR}
|
|||
COPY package.json tsconfig.json ${METAMIGO_DIR}/
|
||||
COPY . ${METAMIGO_DIR}/
|
||||
|
||||
RUN npx --no-install tsc --build --verbose
|
||||
RUN npm --no-install tsc --build --verbose
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
RUN rm -Rf ./node_modules
|
||||
|
||||
FROM node:18-bullseye as clean
|
||||
FROM node:20-bullseye as clean
|
||||
ARG METAMIGO_DIR=/opt/metamigo
|
||||
|
||||
COPY --from=builder ${METAMIGO_DIR} ${METAMIGO_DIR}/
|
||||
|
||||
RUN rm -Rf ./node_modules
|
||||
|
||||
FROM node:18-bullseye as pristine
|
||||
FROM node:20-bullseye as pristine
|
||||
LABEL maintainer="Abel Luck <abel@guardianproject.info>"
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
|
|
|
|||
|
|
@ -50,5 +50,10 @@
|
|||
"jest-config-link": "*",
|
||||
"tsconfig-link": "*",
|
||||
"typescript": "5.0.4"
|
||||
},
|
||||
"overrides": {
|
||||
"@mui/styles": {
|
||||
"react": "18.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:18-bullseye as builder
|
||||
FROM node:20-bullseye as builder
|
||||
|
||||
ARG METAMIGO_DIR=/opt/metamigo
|
||||
RUN mkdir -p ${METAMIGO_DIR}/
|
||||
|
|
@ -12,14 +12,14 @@ RUN npm run build
|
|||
|
||||
RUN rm -Rf ./node_modules
|
||||
|
||||
FROM node:18-bullseye as clean
|
||||
FROM node:20-bullseye as clean
|
||||
ARG METAMIGO_DIR=/opt/metamigo
|
||||
|
||||
COPY --from=builder ${METAMIGO_DIR} ${METAMIGO_DIR}/
|
||||
|
||||
RUN rm -Rf ./node_modules
|
||||
|
||||
FROM node:18-bullseye as pristine
|
||||
FROM node:20-bullseye as pristine
|
||||
LABEL maintainer="Abel Luck <abel@guardianproject.info>"
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
|
|
|
|||
|
|
@ -179,21 +179,21 @@ services:
|
|||
# command: [ "worker" ]
|
||||
# environment: *common-metamigo-variables
|
||||
|
||||
metamigo-postgresql:
|
||||
build: ./docker/postgresql
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- metamigo-data:/var/lib/postgresql/data
|
||||
- ./scripts/bootstrap-metamigo.sh:/docker-entrypoint-initdb.d/bootstrap-metamigo.sh
|
||||
environment:
|
||||
<<: *common-metamigo-variables
|
||||
POSTGRES_PASSWORD: ${METAMIGO_DATABASE_ROOT_PASSWORD}
|
||||
POSTGRES_USER: "root"
|
||||
POSTGRES_DB: "metamigo"
|
||||
expose:
|
||||
- "5432"
|
||||
ports:
|
||||
- 127.0.0.1:5432:5432
|
||||
# metamigo-postgresql:
|
||||
# build: ./docker/postgresql
|
||||
# restart: ${RESTART}
|
||||
# volumes:
|
||||
# - metamigo-data:/var/lib/postgresql/data
|
||||
# - ./scripts/bootstrap-metamigo.sh:/docker-entrypoint-initdb.d/bootstrap-metamigo.sh
|
||||
# environment:
|
||||
# <<: *common-metamigo-variables
|
||||
# POSTGRES_PASSWORD: ${METAMIGO_DATABASE_ROOT_PASSWORD}
|
||||
# POSTGRES_USER: "root"
|
||||
# POSTGRES_DB: "metamigo"
|
||||
# expose:
|
||||
# - "5432"
|
||||
# ports:
|
||||
# - 127.0.0.1:5432:5432
|
||||
|
||||
signald:
|
||||
container_name: signald
|
||||
|
|
@ -214,7 +214,9 @@ services:
|
|||
|
||||
link:
|
||||
container_name: link
|
||||
build: ./apps/link
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./apps/link/Dockerfile
|
||||
expose:
|
||||
- "3000"
|
||||
ports:
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
FROM docker.elastic.co/elasticsearch/elasticsearch:8.6.2
|
||||
FROM docker.elastic.co/elasticsearch/elasticsearch:8.7.1
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
FROM heartexlabs/label-studio:1.7.1
|
||||
FROM heartexlabs/label-studio:1.7.3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
FROM memcached:1.6.10-alpine
|
||||
FROM memcached:1.6.20-bullseye
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
FROM nginxproxy/nginx-proxy:1.2.1
|
||||
FROM nginxproxy/nginx-proxy:1.3.0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
FROM postgres:15.2-alpine
|
||||
FROM postgres:15.3-bullseye
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
FROM redis:7.0.5-alpine
|
||||
FROM redis:7.0.11-bullseye
|
||||
|
|
|
|||
|
|
@ -6,13 +6,12 @@ import { loadConfigRaw } from "@digiresilience/metamigo-config";
|
|||
|
||||
export const genConf = async (): Promise<void> => {
|
||||
const c = await loadConfigRaw();
|
||||
// @ts-expect-error TS2589
|
||||
const generated = generateConfig(c);
|
||||
console.log(generated);
|
||||
};
|
||||
|
||||
export const genSchema = async (): Promise<void> => {
|
||||
const c = await loadConfigRaw();
|
||||
const c: any = await loadConfigRaw();
|
||||
console.log(c.getSchemaString());
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "tsconfig-link",
|
||||
"compilerOptions": {
|
||||
"lib": ["es2020", "DOM"],
|
||||
"incremental": true,
|
||||
"outDir": "build/main",
|
||||
"rootDir": "src",
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
// tk
|
||||
Loading…
Add table
Add a link
Reference in a new issue