Skip to content

Commit 1965e52

Browse files
authored
ci: Optimize build with .dockerignore (#71)
1 parent 768c937 commit 1965e52

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/.backup
2+
/.s3-backup
13
/.github
24
/tests
35
/tools
6+
7+
node_modules
8+
.env*
9+
.previous-backup.tar.gz
10+
.DS_Store

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ jobs:
198198
echo "image_name=$IMAGE_NAME" >> "$GITHUB_OUTPUT"
199199
echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"
200200
echo "image=registry.fly.io/$IMAGE_NAME:$IMAGE_TAG" >> "$GITHUB_OUTPUT"
201-
- name: Build and push frontend Docker image
201+
- name: Build and push CMS Docker image
202202
run: |
203203
flyctl deploy \
204204
--app ${{ steps.image-name.outputs.image_name }} \

apps/cms/Dockerfile.dockerignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Ignore everything
2+
**
3+
4+
# But include the necessary parts
5+
!package.json
6+
!pnpm-lock.yaml
7+
!pnpm-workspace.yaml
8+
!.npmrc
9+
!/apps/cms
10+
!/libs/shared
11+
12+
# These should be ignored, though
13+
**/.cms-cache
14+
**/.next
15+
**/.react-router
16+
**/build
17+
**/node_modules
18+
**/tests
19+
**/.env*
20+
**/tsconfig.tsbuildinfo
21+
**/.vscode
22+
**/.DS_Store
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Ignore everything
2+
**
3+
4+
# But include the necessary parts
5+
!package.json
6+
!pnpm-lock.yaml
7+
!pnpm-workspace.yaml
8+
!.npmrc
9+
!/apps/frontend
10+
!/libs/shared
11+
!/libs/payload-types
12+
13+
# These should be ignored, though
14+
**/.cms-cache
15+
**/.next
16+
**/.react-router
17+
**/build
18+
**/node_modules
19+
**/tests
20+
**/.env*
21+
**/tsconfig.tsbuildinfo
22+
**/.vscode
23+
**/.DS_Store

0 commit comments

Comments
 (0)