File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
frontend/zicdding-class.com Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 13
13
- name : Checkout code
14
14
uses : actions/checkout@v2
15
15
16
+ - name : Prepare Docker context
17
+ run : |
18
+ mkdir -p frontend/zicdding-class.com
19
+ cp package.json frontend/zicdding-class.com/
20
+ cp yarn.lock frontend/zicdding-class.com/
21
+
16
22
- name : Set up Docker Buildx
17
23
uses : docker/setup-buildx-action@v1
18
24
Original file line number Diff line number Diff line change @@ -5,18 +5,18 @@ WORKDIR /app
5
5
6
6
ENV ENV=production
7
7
8
- # Copy package.json and yarn.lock from the frontend directory
9
- COPY ../ package.json ../ yarn.lock ./
8
+ # Copy package.json and yarn.lock from the frontend directory to the Docker build context
9
+ COPY package.json yarn.lock ./
10
10
11
11
# Install dependencies
12
12
RUN yarn install --frozen-lockfile
13
13
14
- # Copy the rest of the code from the frontend directory
15
- COPY ../ /app/
14
+ # Copy the rest of the code from the frontend directory to the Docker build context
15
+ COPY . .
16
16
17
17
# Focus workspaces and build the project
18
18
RUN yarn workspaces focus @zicdding-web/ui @zicdding-web/zicdding-class-com
19
- WORKDIR /app/zicdding-class.com
19
+ WORKDIR /app/frontend/ zicdding-class.com
20
20
RUN yarn build
21
21
22
22
# Production stage
@@ -27,9 +27,9 @@ WORKDIR /app
27
27
ENV ENV=production
28
28
29
29
# Copy built files from the build stage
30
- COPY --from=build /app/zicdding-class.com/build ./build
31
- COPY --from=build /app/zicdding-class.com/package.json ./package.json
32
- COPY --from=build /app/zicdding-class.com/node_modules ./node_modules
30
+ COPY --from=build /app/frontend/ zicdding-class.com/build ./build
31
+ COPY --from=build /app/frontend/ zicdding-class.com/package.json ./package.json
32
+ COPY --from=build /app/frontend/ zicdding-class.com/node_modules ./node_modules
33
33
34
34
EXPOSE 3000
35
35
You can’t perform that action at this time.
0 commit comments