Skip to content

Commit ccf3f1a

Browse files
committed
clean commit
1 parent d50b030 commit ccf3f1a

File tree

133 files changed

+45087
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+45087
-2
lines changed

.DS_Store

10 KB
Binary file not shown.

.env.template

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
AWS_ACCOUNT_ID="123412341234"
2+
AWS_REGION="us-east-1"
3+
DOMAIN="domain.com"
4+
WEB_SUBDOMAIN="www"
5+
HOSTED_ZONE_NAME="domain.com"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# nextjs-strapi-cms
2-
Serverless, ECS, Fargate, Application Load Balancer, Custom Postgress with PgBouncer setup
1+
# nextjs-strapi-cms-aws-cdk
2+
3+
Serverless, ECS, Fargate, Application Load Balancer, Custom Postgress with PgBouncer setup

cms/.dockerignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
.tmp/
3+
.cache/
4+
.git/
5+
build/
6+
.env

cms/.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[{package.json,*.yml}]
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

cms/.env.example

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
HOST=0.0.0.0
2+
PORT=1337
3+
APP_KEYS="toBeModified1,toBeModified2"
4+
API_TOKEN_SALT=tobemodified
5+
ADMIN_JWT_SECRET=tobemodified
6+
TRANSFER_TOKEN_SALT=tobemodified
7+
JWT_SECRET=tobemodified

cms/.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.cache
2+
build
3+
**/node_modules/**

cms/.eslintrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": "eslint:recommended",
4+
"env": {
5+
"commonjs": true,
6+
"es6": true,
7+
"node": true,
8+
"browser": false
9+
},
10+
"parserOptions": {
11+
"ecmaFeatures": {
12+
"experimentalObjectRestSpread": true,
13+
"jsx": false
14+
},
15+
"sourceType": "module"
16+
},
17+
"globals": {
18+
"strapi": true
19+
},
20+
"rules": {
21+
"indent": ["error", 2, { "SwitchCase": 1 }],
22+
"linebreak-style": ["error", "unix"],
23+
"no-console": 0,
24+
"quotes": ["error", "single"],
25+
"semi": ["error", "always"]
26+
}
27+
}

cms/.gitignore

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
############################
2+
# OS X
3+
############################
4+
5+
.DS_Store
6+
.AppleDouble
7+
.LSOverride
8+
Icon
9+
.Spotlight-V100
10+
.Trashes
11+
._*
12+
13+
14+
############################
15+
# Linux
16+
############################
17+
18+
*~
19+
20+
21+
############################
22+
# Windows
23+
############################
24+
25+
Thumbs.db
26+
ehthumbs.db
27+
Desktop.ini
28+
$RECYCLE.BIN/
29+
*.cab
30+
*.msi
31+
*.msm
32+
*.msp
33+
34+
35+
############################
36+
# Packages
37+
############################
38+
39+
*.7z
40+
*.csv
41+
*.dat
42+
*.dmg
43+
*.gz
44+
*.iso
45+
*.jar
46+
*.rar
47+
*.tar
48+
*.zip
49+
*.com
50+
*.class
51+
*.dll
52+
*.exe
53+
*.o
54+
*.seed
55+
*.so
56+
*.swo
57+
*.swp
58+
*.swn
59+
*.swm
60+
*.out
61+
*.pid
62+
63+
64+
############################
65+
# Logs and databases
66+
############################
67+
68+
.tmp
69+
*.log
70+
*.sql
71+
*.sqlite
72+
*.sqlite3
73+
74+
75+
############################
76+
# Misc.
77+
############################
78+
79+
*#
80+
ssl
81+
.idea
82+
nbproject
83+
public/uploads/*
84+
!public/uploads/.gitkeep
85+
86+
############################
87+
# Node.js
88+
############################
89+
90+
lib-cov
91+
lcov.info
92+
pids
93+
logs
94+
results
95+
node_modules
96+
.node_history
97+
98+
############################
99+
# Tests
100+
############################
101+
102+
coverage
103+
104+
############################
105+
# Strapi
106+
############################
107+
108+
.env
109+
license.txt
110+
exports
111+
.strapi
112+
dist
113+
build
114+
.strapi-updater.json
115+
.strapi-cloud.json

cms/Dockerfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Creating multi-stage build for production
2+
FROM node:18-alpine as build
3+
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev git > /dev/null 2>&1
4+
ARG NODE_ENV=production
5+
ENV NODE_ENV=${NODE_ENV}
6+
7+
WORKDIR /opt/
8+
COPY package.json package-lock.json ./
9+
RUN npm install -g node-gyp
10+
RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install --only=production
11+
ENV PATH /opt/node_modules/.bin:$PATH
12+
WORKDIR /opt/app
13+
COPY . .
14+
RUN npm run build
15+
16+
# Creating final production image
17+
FROM node:18-alpine
18+
RUN apk add --no-cache vips-dev
19+
ARG NODE_ENV=production
20+
ENV NODE_ENV=${NODE_ENV}
21+
WORKDIR /opt/
22+
COPY --from=build /opt/node_modules ./node_modules
23+
WORKDIR /opt/app
24+
COPY --from=build /opt/app ./
25+
ENV PATH /opt/node_modules/.bin:$PATH
26+
27+
RUN chown -R node:node /opt/app
28+
USER node
29+
EXPOSE 1337
30+
CMD ["npm", "run", "start"]

cms/Dockerfile.dev

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:18-alpine
2+
# Installing libvips-dev for sharp Compatibility
3+
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev git
4+
ARG NODE_ENV=development
5+
ENV NODE_ENV=${NODE_ENV}
6+
7+
WORKDIR /opt/
8+
COPY package.json package-lock.json ./
9+
RUN npm install -g node-gyp
10+
RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install
11+
ENV PATH /opt/node_modules/.bin:$PATH
12+
13+
WORKDIR /opt/app
14+
COPY . .
15+
RUN chown -R node:node /opt/app
16+
USER node
17+
RUN ["npm", "run", "build"]
18+
EXPOSE 1337
19+
CMD ["npm", "run", "develop"]

cms/README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# 🚀 Getting started with Strapi
2+
3+
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds.
4+
5+
### `develop`
6+
7+
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop)
8+
9+
```
10+
npm run develop
11+
# or
12+
yarn develop
13+
```
14+
15+
### `start`
16+
17+
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start)
18+
19+
```
20+
npm run start
21+
# or
22+
yarn start
23+
```
24+
25+
### `build`
26+
27+
Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build)
28+
29+
```
30+
npm run build
31+
# or
32+
yarn build
33+
```
34+
35+
## ⚙️ Deployment
36+
37+
Strapi gives you many possible deployment options for your project including [Strapi Cloud](https://cloud.strapi.io). Browse the [deployment section of the documentation](https://docs.strapi.io/dev-docs/deployment) to find the best solution for your use case.
38+
39+
```
40+
yarn strapi deploy
41+
```
42+
43+
## 📚 Learn more
44+
45+
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
46+
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
47+
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
48+
- [Strapi blog](https://strapi.io/blog) - Official Strapi blog containing articles made by the Strapi team and the community.
49+
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
50+
51+
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
52+
53+
## ✨ Community
54+
55+
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
56+
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
57+
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.
58+
59+
---
60+
61+
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>

cms/config/admin.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = ({ env }) => ({
2+
auth: {
3+
secret: env('ADMIN_JWT_SECRET'),
4+
},
5+
apiToken: {
6+
salt: env('API_TOKEN_SALT'),
7+
},
8+
transfer: {
9+
token: {
10+
salt: env('TRANSFER_TOKEN_SALT'),
11+
},
12+
},
13+
flags: {
14+
nps: env.bool('FLAG_NPS', true),
15+
promoteEE: env.bool('FLAG_PROMOTE_EE', true),
16+
},
17+
});

cms/config/api.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
rest: {
3+
defaultLimit: 25,
4+
maxLimit: 100,
5+
withCount: true,
6+
},
7+
};

0 commit comments

Comments
 (0)