Skip to content

Commit

Permalink
rename and add context to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Lai authored and Alexander Lai committed Aug 4, 2024
1 parent 1d53b6e commit a566366
Show file tree
Hide file tree
Showing 54 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: frontend
context: .
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docusaurusIntegration' }}
platforms: linux/amd64
file: frontend/Dockerfile
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 10 additions & 9 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,31 @@ FROM node:18.16.0-alpine as builder
# Set the current working directory inside the container
WORKDIR /app

COPY package.json yarn.lock ./
COPY frontend/package.json frontend/yarn.lock ./
RUN yarn install --frozen-lockfile

ARG VITE_API_BASE_URL
ARG VITE_OAUTH_CALLBACK_URL
ENV VITE_API_BASE_URL $VITE_API_BASE_URL
ENV VITE_OAUTH_CALLBACK_URL $VITE_OAUTH_CALLBACK_URL

COPY . .
COPY frontend ./

RUN yarn run build

FROM node:18.16.0-alpine as chaos-docs-builder

WORKDIR /chaos-docs
WORKDIR /docs

# Copy chaos-docs package.json and yarn.lock
COPY ../chaos-docs/package.json ../chaos-docs/yarn.lock ./
# Copy chaos-docs files and install dependencies
COPY docs/package.json docs/yarn.lock ./
RUN yarn install --frozen-lockfile

# Copy the rest of the chaos-docs files and build
COPY ../chaos-docs ./
RUN npm run generate-docs
RUN npm run build
COPY docs ./
RUN yarn run generate-docs
RUN yarn run build


# nginx state for serving content
FROM nginx:1.25.0-alpine
Expand All @@ -38,7 +39,7 @@ WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
# Copy static assets from builder stage
COPY --from=builder /app/dist .
COPY --from=chaos-docs-builder /chaos-docs/dist ./chaos-docs
COPY --from=chaos-docs-builder /docs/dist ./docs

EXPOSE 80

Expand Down

0 comments on commit a566366

Please sign in to comment.