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

Dockerfile changes #664

Merged
merged 9 commits into from
Apr 16, 2024
Merged
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
5 changes: 3 additions & 2 deletions Dockerfiles/Dockerfile.agent-provisioning
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ RUN pnpm i
COPY . .

# Generate Prisma client
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate
RUN ls -R /app/apps/agent-provisioning/AFJ/

# Build the user service
Expand Down Expand Up @@ -86,7 +87,7 @@ RUN chmod 777 /app/agent-provisioning/AFJ/token
COPY libs/ ./libs/

# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-provisioning/main.js $ROOT_PATH"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/agent-provisioning/main.js $ROOT_PATH"]

# docker build -t agent-provisioning-service -f Dockerfiles/Dockerfile.agent-provisioning .
# docker run -d --env-file .env --name agent-provisioning-service docker.io/library/agent-provisioning-service
5 changes: 3 additions & 2 deletions Dockerfiles/Dockerfile.agent-service
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the user service
RUN pnpm run build agent-service
Expand Down Expand Up @@ -48,7 +49,7 @@ COPY --from=build /app/libs/ ./libs/
COPY --from=build /app/node_modules ./node_modules

# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma migrate deploy && cd ../.. && node dist/apps/agent-service/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/agent-service/main.js"]

# docker build -t agent-service -f Dockerfiles/Dockerfile.agent-service .
# docker run -d --env-file .env --name agent-service docker.io/library/agent-service
Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/Dockerfile.api-gateway
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the api-gateway service
RUN pnpm run build api-gateway
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/Dockerfile.connection
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the connection service
RUN pnpm run build connection
Expand All @@ -36,7 +37,7 @@ COPY --from=build /app/node_modules ./node_modules
#RUN npm i --only=production

# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/connection/main.js"]

# docker build -t connection -f Dockerfiles/Dockerfile.connection .
# docker run -d --env-file .env --name connection docker.io/library/connection
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/Dockerfile.ecosystem
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the issuance service
RUN pnpm run build ecosystem
Expand All @@ -34,7 +35,7 @@ COPY --from=build /app/node_modules ./node_modules


# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ecosystem/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/ecosystem/main.js"]

# docker build -t ecosystem -f Dockerfiles/Dockerfile.ecosystem .
# docker run -d --env-file .env --name ecosystem docker.io/library/ecosystem
Expand Down
6 changes: 4 additions & 2 deletions Dockerfiles/Dockerfile.issuance
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate


# Build the issuance service
RUN pnpm run build issuance
Expand All @@ -35,7 +37,7 @@ COPY --from=build /app/node_modules ./node_modules


# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/issuance/main.js"]

# docker build -t issuance -f Dockerfiles/Dockerfile.issuance .
# docker run -d --env-file .env --name issuance docker.io/library/issuance
Expand Down
6 changes: 4 additions & 2 deletions Dockerfiles/Dockerfile.ledger
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate


# Build the ledger service
RUN npm run build ledger
Expand All @@ -34,7 +36,7 @@ COPY --from=build /app/libs/ ./libs/
COPY --from=build /app/node_modules ./node_modules

# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/ledger/main.js"]

# docker build -t ledger -f Dockerfiles/Dockerfile.ledger .
# docker run -d --env-file .env --name ledger docker.io/library/ledger
Expand Down
6 changes: 4 additions & 2 deletions Dockerfiles/Dockerfile.notification
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ RUN pnpm i --ignore-scripts

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate


# Build the notification service
RUN npm run build notification
Expand All @@ -34,7 +36,7 @@ COPY --from=build /app/libs/ ./libs/
COPY --from=build /app/node_modules ./node_modules

# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/notification/main.js"]

# docker build -t notification -f Dockerfiles/Dockerfile.notification .
# docker run -d --env-file .env --name notification docker.io/library/notification
Expand Down
6 changes: 4 additions & 2 deletions Dockerfiles/Dockerfile.organization
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate


# Build the organization service
RUN pnpm run build organization
Expand All @@ -33,7 +35,7 @@ COPY --from=build /app/libs/ ./libs/
COPY --from=build /app/node_modules ./node_modules

# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/organization/main.js"]

# docker build -t organization -f Dockerfiles/Dockerfile.organization .
# docker run -d --env-file .env --name issuance docker.io/library/organization
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/Dockerfile.user
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ RUN pnpm install

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the user service
RUN pnpm run build user
Expand Down Expand Up @@ -62,7 +63,7 @@ COPY --from=build /app/node_modules ./node_modules


# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && npx prisma && cd ../.. && node dist/apps/user/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/user/main.js"]

# docker build -t user -f Dockerfiles/Dockerfile.user .
# docker run -d --env-file .env --name user docker.io/library/user
Expand Down
35 changes: 18 additions & 17 deletions Dockerfiles/Dockerfile.utility
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ FROM node:18-slim as build
RUN npm install -g pnpm

# We don't need the standalone Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

# Install Google Chrome Stable and fonts
# Note: this installs the necessary libs to make the browser work with Puppeteer.
RUN apt-get update && apt-get install gnupg wget -y && \
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# RUN apt-get update && apt-get install gnupg wget -y && \
# wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
# sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
# apt-get update && \
# apt-get install google-chrome-stable -y --no-install-recommends && \
# rm -rf /var/lib/apt/lists/*

# RUN apk update && apk list --all-versions chromium
# Set the working directory
Expand All @@ -26,7 +26,8 @@ RUN pnpm install

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the user service
RUN pnpm run build utility
Expand All @@ -35,16 +36,16 @@ RUN pnpm run build utility
FROM node:18-slim

# We don't need the standalone Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

# Install Google Chrome Stable and fonts
# Note: this installs the necessary libs to make the browser work with Puppeteer.
RUN apt-get update && apt-get install gnupg wget -y && \
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# RUN apt-get update && apt-get install gnupg wget -y && \
# wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
# sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
# apt-get update && \
# apt-get install google-chrome-stable -y --no-install-recommends && \
# rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app
Expand All @@ -60,8 +61,8 @@ COPY --from=build /app/node_modules ./node_modules


# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && npx prisma && cd ../.. && node dist/apps/utility/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/utility/main.js"]

# docker build -t user -f Dockerfiles/Dockerfile.user .
# docker run -d --env-file .env --name user docker.io/library/user
# docker logs -f user
# docker logs -f user
5 changes: 3 additions & 2 deletions Dockerfiles/Dockerfile.verification
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the user service
RUN npm run build verification
Expand All @@ -32,7 +33,7 @@ COPY --from=build /app/libs/ ./libs/
COPY --from=build /app/node_modules ./node_modules

# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/verification/main.js"]

# docker build -t verification -f Dockerfiles/Dockerfile.verification .
# docker run -d --env-file .env --name verification docker.io/library/verification
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/Dockerfile.webhook
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN pnpm i

# Copy the rest of the application code
COPY . .
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
RUN cd libs/prisma-service && npx prisma migrate && npx prisma generate

# Build the webhook service
RUN pnpm run build webhook
Expand All @@ -35,7 +36,7 @@ COPY --from=build /app/node_modules ./node_modules


# Set the command to run the microservice
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"]
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/webhook/main.js"]

# docker build -t webhook -f Dockerfiles/Dockerfile.webhook .
# docker run -d --env-file .env --name webhook docker.io/library/webhook
Expand Down
Loading
Loading