Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build docker images for arm arch #3309

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base
FROM node:16-alpine3.16 as dev_base

RUN apk add g++ make py3-pip

ARG BULL_MQ_PRO_TOKEN
ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN
Expand Down
4 changes: 2 additions & 2 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\"",
"precommit": "lint-staged",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/api/Dockerfile | docker buildx build -t novu-api --build-arg PACKAGE_PATH=apps/api -",
"docker:build:depot": "pnpm --silent --workspace-root pnpm-context -- apps/api/Dockerfile | depot build --build-arg PACKAGE_PATH=apps/api - -t novu-api --load",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/api/Dockerfile | docker buildx build --platform=linux/amd64,linux/arm64 -t novu-api --build-arg PACKAGE_PATH=apps/api -",
"docker:build:depot": "pnpm --silent --workspace-root pnpm-context -- apps/api/Dockerfile | depot build --platform=linux/amd64,linux/arm64 --build-arg PACKAGE_PATH=apps/api - -t novu-api --load",
"start": "pnpm start:dev",
"start:dev": "cross-env TZ=UTC nest start --watch",
"start:test": "cross-env NODE_ENV=test PORT=1336 TZ=UTC nest start --watch",
Expand Down
4 changes: 3 additions & 1 deletion apps/inbound-mail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base
FROM node:16-alpine3.16 as dev_base

RUN apk add g++ make py3-pip

ARG BULL_MQ_PRO_TOKEN
ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN
Expand Down
2 changes: 1 addition & 1 deletion apps/inbound-mail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc -p tsconfig.json",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/inbound-mail/Dockerfile | docker build --build-arg PACKAGE_PATH=apps/inbound-mail - -t novu-inbound-mail",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/inbound-mail/Dockerfile | docker buildx build --platform=linux/amd64,linux/arm64 --build-arg PACKAGE_PATH=apps/inbound-mail - -t novu-inbound-mail",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nodemon",
"start:dev": "nodemon",
Expand Down
5 changes: 4 additions & 1 deletion apps/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# start build stage
FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as builder
FROM node:16-alpine3.16 as dev_base

RUN apk add g++ make py3-pip

ENV NX_DAEMON=false

WORKDIR /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"prebuild": "rimraf build",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 react-app-rewired --max_old_space_size=4096 build",
"precommit": "lint-staged",
"docker:build": "docker buildx build -f ./Dockerfile -t novu-web ./../..",
"docker:build": "docker buildx build --platform=linux/amd64,linux/arm64 -f ./Dockerfile -t novu-web ./../..",
"envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js",
"envsetup": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/env-config.js",
"start:static:build": "pnpm envsetup:docker && http-server build -p 4200 --proxy http://localhost:4200?",
Expand Down
5 changes: 4 additions & 1 deletion apps/webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base
FROM node:16-alpine3.16 as dev_base

RUN apk add g++ make py3-pip

ENV NX_DAEMON=false

RUN npm i pm2 -g
Expand Down
2 changes: 1 addition & 1 deletion apps/webhook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/webhook/Dockerfile | docker build --build-arg PACKAGE_PATH=apps/webhook - -t novu-webhook",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/webhook/Dockerfile | docker buildx build --platform=linux/amd64,linux/arm64 --build-arg PACKAGE_PATH=apps/webhook - -t novu-webhook",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nodemon",
"start:dev": "nodemon",
Expand Down
5 changes: 4 additions & 1 deletion apps/widget/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine
FROM node:16-alpine3.16 as dev_base

RUN apk add g++ make py3-pip

ENV NX_DAEMON=false

WORKDIR /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion apps/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js",
"start:static:build": "pnpm envsetup:docker && http-server build -p 4500 --proxy http://localhost:4500?",
"start:docker": "pnpm build && pnpm start:static:build",
"docker:build": "docker build -f ./Dockerfile -t novu-widget ./../..",
"docker:build": "docker buildx build --platform=linux/amd64,linux/arm64 -f ./Dockerfile -t novu-widget ./../..",
"prebuild": "rimraf build",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 craco build",
"precommit": "lint-staged",
Expand Down
4 changes: 3 additions & 1 deletion apps/worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base
FROM node:16-alpine3.16 as dev_base

RUN apk add g++ make py3-pip
RUN apk --update --no-cache add curl
ENV NX_DAEMON=false

Expand Down
4 changes: 2 additions & 2 deletions apps/worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\"",
"precommit": "lint-staged",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/worker/Dockerfile | docker buildx build --build-arg PACKAGE_PATH=apps/worker - -t novu-worker --load",
"docker:build:depot": "pnpm --silent --workspace-root pnpm-context -- apps/worker/Dockerfile | depot build --build-arg PACKAGE_PATH=apps/worker - -t novu-worker --load",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/worker/Dockerfile | docker buildx build --platform=linux/amd64,linux/arm64 --build-arg PACKAGE_PATH=apps/worker - -t novu-worker --load",
"docker:build:depot": "pnpm --silent --workspace-root pnpm-context -- apps/worker/Dockerfile | depot build --platform=linux/amd64,linux/arm64 --build-arg PACKAGE_PATH=apps/worker - -t novu-worker --load",
"start": "pnpm start:dev",
"start:dev": "cross-env TZ=UTC nest start --watch",
"start:test": "cross-env NODE_ENV=test PORT=1342 TZ=UTC nest start --watch",
Expand Down
2 changes: 2 additions & 0 deletions apps/ws/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM node:16-alpine3.16

RUN apk add g++ make py3-pip

ARG BULL_MQ_PRO_TOKEN
ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN
ENV NX_DAEMON=false
Expand Down
2 changes: 1 addition & 1 deletion apps/ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"docker:build": "docker build -f ./Dockerfile -t novu-ws ./../..",
"docker:build": "docker buildx build --platform=linux/amd64,linux/arm64 -f ./Dockerfile -t novu-ws ./../..",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nodemon",
"start:dev": "nodemon",
Expand Down