Remove CDK stuff
Going to leave this repo as just the emojos.in app, and handle deployment via another repository.
This commit is contained in:
parent
bce5cff3a6
commit
ea080cde8f
|
@ -1,2 +0,0 @@
|
|||
/dist
|
||||
/cdk.out
|
23
.eslintrc.js
23
.eslintrc.js
|
@ -1,23 +0,0 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
},
|
||||
extends: [
|
||||
'airbnb-base',
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 12,
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: [
|
||||
'@typescript-eslint',
|
||||
'simple-import-sort',
|
||||
],
|
||||
rules: {
|
||||
'no-new': 'off',
|
||||
'simple-import-sort/exports': 'error',
|
||||
'simple-import-sort/imports': 'error',
|
||||
},
|
||||
};
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"extends": "airbnb-base",
|
||||
"env": {
|
||||
"browser": true
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
/cdk.out
|
||||
/dist
|
||||
/node_modules
|
|
@ -0,0 +1,7 @@
|
|||
[settings]
|
||||
multi_line_output = 3
|
||||
include_trailing_comma = True
|
||||
force_grid_wrap = 0
|
||||
use_parentheses = True
|
||||
ensure_newline_before_comments = True
|
||||
line_length = 88
|
12
cdk.json
12
cdk.json
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"app": "npx ts-node index.ts",
|
||||
"context": {
|
||||
"@aws-cdk/core:enableStackNameDuplicates": "true",
|
||||
"aws-cdk:enableDiffNoFail": "true",
|
||||
"@aws-cdk/core:stackRelativeExports": "true",
|
||||
"@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": "true",
|
||||
"@aws-cdk/aws-secretsmanager:parseOwnedSecretName": "true",
|
||||
"@aws-cdk/aws-kms:defaultKeyPolicies": "true",
|
||||
"@aws-cdk/aws-s3:grantWriteWithoutAcl": "true"
|
||||
}
|
||||
}
|
51
index.ts
51
index.ts
|
@ -1,51 +0,0 @@
|
|||
import { App, Duration, Stack } from 'monocdk';
|
||||
import { DomainName, HttpApi } from 'monocdk/aws-apigatewayv2';
|
||||
import { LambdaProxyIntegration } from 'monocdk/aws-apigatewayv2-integrations';
|
||||
import { Certificate } from 'monocdk/aws-certificatemanager';
|
||||
import { PolicyStatement } from 'monocdk/aws-iam';
|
||||
import { Runtime } from 'monocdk/aws-lambda';
|
||||
import { PythonFunction } from 'monocdk/aws-lambda-python';
|
||||
import { RetentionDays } from 'monocdk/aws-logs';
|
||||
|
||||
class EmojosStack extends Stack {
|
||||
constructor(app: App, id: string) {
|
||||
super(app, id);
|
||||
|
||||
const handler = new PythonFunction(this, 'App', {
|
||||
entry: 'app',
|
||||
index: 'emojos.py',
|
||||
handler: 'handle_request',
|
||||
runtime: Runtime.PYTHON_3_8,
|
||||
|
||||
environment: {
|
||||
STRIP_STAGE_PATH: 'yes',
|
||||
},
|
||||
|
||||
memorySize: 256,
|
||||
timeout: Duration.seconds(15),
|
||||
|
||||
logRetention: RetentionDays.ONE_MONTH,
|
||||
});
|
||||
|
||||
// allow function to redirect to its own source code
|
||||
handler.addToRolePolicy(new PolicyStatement({
|
||||
actions: ['lambda:GetFunction'],
|
||||
resources: ['*'],
|
||||
}));
|
||||
|
||||
new HttpApi(this, 'HttpApi', {
|
||||
defaultIntegration: new LambdaProxyIntegration({ handler }),
|
||||
defaultDomainMapping: {
|
||||
domainName: new DomainName(this, 'HttpApiDomain', {
|
||||
domainName: 'emojos.in',
|
||||
certificate: Certificate.fromCertificateArn(this, 'Certificate',
|
||||
'arn:aws:acm:us-west-2:583422757513:certificate/85544743-8592-4580-a25f-27f66fc90935'),
|
||||
}),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const app = new App();
|
||||
new EmojosStack(app, 'EmojosStack');
|
||||
app.synth();
|
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"name": "emojos.in",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"watch": "tsc -w",
|
||||
"cdk": "cdk",
|
||||
"lint": "eslint --ext .js,.ts .",
|
||||
"fix": "eslint --ext .js,.ts . --fix"
|
||||
},
|
||||
"private": true,
|
||||
"author": "iliana etaoin <iliana@buttslol.net>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"constructs": "^3.3.18",
|
||||
"monocdk": "^1.89.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node14": "^1.0.0",
|
||||
"@types/node": "^14.14.26",
|
||||
"@typescript-eslint/eslint-plugin": "^4.15.0",
|
||||
"@typescript-eslint/parser": "^4.15.0",
|
||||
"aws-cdk": "^1.89.0",
|
||||
"eslint": "^7.19.0",
|
||||
"eslint-config-airbnb-base": "^14.2.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||
"typescript": "^4.1.5"
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"extends": "@tsconfig/node14/tsconfig.json",
|
||||
"compilerOptions": { "outDir": "dist" }
|
||||
}
|
Loading…
Reference in New Issue