diff --git a/Dockerfile b/Dockerfile index 2bb7d9ccd..ea888cd21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM golang:buster as app +FROM golang:bookworm AS app RUN mkdir -p /yopass WORKDIR /yopass COPY . . RUN go build ./cmd/yopass && go build ./cmd/yopass-server -FROM node:18 as website +FROM node:18 AS website COPY website /website WORKDIR /website RUN yarn install --network-timeout 600000 && yarn build diff --git a/deploy/cdk/.gitignore b/deploy/cdk/.gitignore index ca8288c2e..7367ab095 100644 --- a/deploy/cdk/.gitignore +++ b/deploy/cdk/.gitignore @@ -8,4 +8,5 @@ node_modules cdk.out bootstrap -bootstrap.zip \ No newline at end of file +bootstrap.zip +deployment.zip \ No newline at end of file diff --git a/deploy/cdk/bin/cdk.ts b/deploy/cdk/bin/cdk.ts index 418a63859..4311abb05 100644 --- a/deploy/cdk/bin/cdk.ts +++ b/deploy/cdk/bin/cdk.ts @@ -13,7 +13,7 @@ new CdkStack(app, "CdkStack", { * and Region that are implied by the current CLI configuration. */ env: { account: process.env.CDK_DEFAULT_ACCOUNT, - region: process.env.CDK_DEFAULT_REGION, + region: "eu-west-1", }, /* Uncomment the next line if you know exactly what Account and Region you diff --git a/deploy/cdk/package.json b/deploy/cdk/package.json index 569c7cf78..6ce9600c6 100644 --- a/deploy/cdk/package.json +++ b/deploy/cdk/package.json @@ -5,18 +5,18 @@ "cdk": "bin/cdk.js" }, "scripts": { - "build": "tsc", + "build": "tsc && GOOS=linux GOARCH=arm64 go build -o ./bootstrap -tags lambda.norpc && zip deployment.zip bootstrap", "watch": "tsc -w", "test": "jest", "cdk": "cdk", - "deploy": "GOOS=linux GOARCH=arm64 go build -o ./bootstrap -tags lambda.norpc && zip deployment.zip bootstrap && cdk synth" + "deploy": "cdk synth" }, "devDependencies": { "@types/jest": "^29.5.12", "@types/node": "22.5.4", + "aws-cdk": "2.161.1", "jest": "^29.7.0", "ts-jest": "^29.2.5", - "aws-cdk": "2.161.1", "ts-node": "^10.9.2", "typescript": "~5.6.2" }, @@ -25,4 +25,4 @@ "constructs": "^10.0.0", "source-map-support": "^0.5.21" } -} \ No newline at end of file +}