@@ -5,7 +5,7 @@ FROM oven/bun:1 AS base
5
5
WORKDIR /usr/src/app
6
6
7
7
# Install curl - I wonder if there is a better way to do this, because it is only needed for the healthcheck — is wget installed by default?
8
- RUN apt-get update && apt-get install -y curl rsync
8
+ RUN apt-get update && apt-get install -y curl
9
9
10
10
# install dependencies into temp directory
11
11
# this will cache them and speed up future builds
@@ -41,20 +41,16 @@ COPY . .
41
41
# copy production dependencies and source code into final image
42
42
FROM base AS release
43
43
COPY --from=install /temp/prod/node_modules ./node_modules
44
-
45
- # Use rsync to copy files while respecting .gitignore and .dockerignore
46
- # https://unix.stackexchange.com/questions/168561/rsync-folder-while-exclude-froming-gitignore-files-at-different-depths
47
- RUN rsync --filter='dir-merge,-n /.gitignore' /usr/src/app/ /usr/src/app_release/
48
-
49
- COPY --from=prerelease /usr/src/app_release/app ./app
50
- COPY --from=prerelease /usr/src/app_release/config ./config
51
- COPY --from=prerelease /usr/src/app_release/core ./core
52
- COPY --from=prerelease /usr/src/app_release/docs ./docs
53
- COPY --from=prerelease /usr/src/app_release/routes ./routes
54
- COPY --from=prerelease /usr/src/app_release/storage ./storage
55
- COPY --from=prerelease /usr/src/app_release/index.ts ./index.ts
56
- COPY --from=prerelease /usr/src/app_release/tsconfig.json ./tsconfig.json
57
- COPY --from=prerelease /usr/src/app_release/package.json ./package.json
44
+ COPY --from=prerelease /usr/src/app/app ./app
45
+ COPY --from=prerelease /usr/src/app/config ./config
46
+ COPY --from=prerelease /usr/src/app/core ./core
47
+ COPY --from=prerelease /usr/src/app/docs ./docs
48
+ COPY --from=prerelease /usr/src/app/routes ./routes
49
+ # TODO: need to exclude all ignored files and folders from the build
50
+ COPY --from=prerelease /usr/src/app/storage ./storage
51
+ COPY --from=prerelease /usr/src/app/index.ts ./index.ts
52
+ COPY --from=prerelease /usr/src/app/tsconfig.json ./tsconfig.json
53
+ COPY --from=prerelease /usr/src/app/package.json ./package.json
58
54
59
55
# Add volume for logs
60
56
VOLUME ["/mnt/efs" ]
0 commit comments