Skip to content

Commit

Permalink
New Prod Dockerfiles - Test I.
Browse files Browse the repository at this point in the history
  • Loading branch information
martintomas committed Aug 3, 2023
1 parent 9755044 commit 2c00d78
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/client_ci_cd.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Client CI/CD

on:
workflow_dispatch:
push:
paths:
- 'client/**'
- '.github/workflows/client*'
workflow_dispatch:

jobs:
deploy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cms_ci_cd.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CMS CI/CD

on:
workflow_dispatch:
push:
paths:
- 'cms/**'
- '.github/workflows/cms*'
workflow_dispatch:

jobs:
deploy:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.client.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Build all the things
FROM node:18-alpine AS build
RUN apk add --no-cache libc6-compat
ENV NODE_ENV production
Expand All @@ -15,6 +16,7 @@ COPY ./client .

RUN yarn build

# Copy only the built files into the final image
FROM node:18-alpine AS runner
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.cms.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Build all the things
FROM node:18-alpine as build
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev > /dev/null 2>&1
ENV NODE_ENV production
Expand All @@ -13,12 +14,13 @@ RUN yarn install
COPY ./cms .
RUN yarn build

# Copy only the built files into the final image
FROM node:18-alpine AS runner
RUN apk add --no-cache vips-dev
WORKDIR /app

ENV NODE_ENV production

WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 strapi

Expand Down

0 comments on commit 2c00d78

Please sign in to comment.