Skip to content

Commit 4cd33d5

Browse files
committed
chore: wip
1 parent e8e85da commit 4cd33d5

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

storage/framework/cloud/Dockerfile

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM oven/bun:1 AS base
55
WORKDIR /usr/src/app
66

77
# 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
99

1010
# install dependencies into temp directory
1111
# this will cache them and speed up future builds
@@ -41,20 +41,16 @@ COPY . .
4141
# copy production dependencies and source code into final image
4242
FROM base AS release
4343
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
5854

5955
# Add volume for logs
6056
VOLUME ["/mnt/efs"]

storage/framework/core/buddy/src/commands/deploy.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ export function deploy(buddy: CLI) {
1313
const descriptions = {
1414
deploy: 'Re-installs your npm dependencies',
1515
project: 'Target a specific project',
16+
production: 'Deploy to production',
17+
development: 'Deploy to development',
18+
staging: 'Deploy to staging',
1619
verbose: 'Enable verbose output',
1720
}
1821

1922
buddy
20-
.command('deploy', descriptions.deploy)
23+
.command('deploy [env]', descriptions.deploy)
2124
.option('--domain', 'Specify a domain to deploy to', { default: undefined })
2225
.option('-p, --project [project]', descriptions.project, { default: false })
26+
.option('--prod', descriptions.production, { default: true })
27+
.option('--dev', descriptions.development, { default: false })
28+
.option('--staging', descriptions.staging, { default: false })
2329
.option('--verbose', descriptions.verbose, { default: false })
2430
.action(async (options: DeployOptions) => {
2531
log.debug('Running `buddy deploy` ...', options)

storage/framework/core/types/src/deploy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ import type { CliOptions } from './cli'
1010
export interface DeployOptions extends CliOptions {
1111
domain?: string
1212
deploy?: boolean
13+
prod?: boolean
14+
dev?: boolean
15+
staging?: boolean
1316
}

0 commit comments

Comments
 (0)