deploy-stack 0.9.12 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/utils/generator.js
CHANGED
|
@@ -94,28 +94,29 @@ export async function generateTemplates(targetDir, config) {
|
|
|
94
94
|
|
|
95
95
|
// 6. Create .dockerignore to keep images lean and secure
|
|
96
96
|
const dockerignorePath = path.join(targetDir, '.dockerignore');
|
|
97
|
+
const appendDockerIgnore = '\n# Infrastructure (deploy-stack)\nterraform/\n**/.terraform/\n**/.terraform.*\n**/*.tfstate*\n.env\n';
|
|
98
|
+
|
|
97
99
|
if (!fsSync.existsSync(dockerignorePath)) {
|
|
98
100
|
const dockerignoreContent = `
|
|
99
101
|
.git/
|
|
100
102
|
.github/
|
|
101
|
-
terraform/
|
|
102
|
-
**/.terraform/
|
|
103
|
-
**/.terraform.*
|
|
104
|
-
**/*.tfstate*
|
|
105
|
-
.env
|
|
106
103
|
README.md
|
|
107
104
|
node_modules/
|
|
108
105
|
npm-debug.log
|
|
109
106
|
__pycache__/
|
|
110
107
|
*.pyc
|
|
111
108
|
.DS_Store
|
|
112
|
-
`.trim();
|
|
109
|
+
`.trim() + appendDockerIgnore;
|
|
113
110
|
await fs.writeFile(dockerignorePath, dockerignoreContent);
|
|
111
|
+
} else {
|
|
112
|
+
const existingDockerignore = await fs.readFile(dockerignorePath, 'utf-8');
|
|
113
|
+
if (!existingDockerignore.includes('terraform/')) {
|
|
114
|
+
await fs.appendFile(dockerignorePath, appendDockerIgnore);
|
|
115
|
+
}
|
|
114
116
|
}
|
|
115
|
-
}
|
|
116
117
|
|
|
117
|
-
function getGitignoreContent(framework) {
|
|
118
|
-
|
|
118
|
+
function getGitignoreContent(framework) {
|
|
119
|
+
const baseIgnore = `
|
|
119
120
|
# Infrastructure (deploy-stack)
|
|
120
121
|
terraform/.terraform/
|
|
121
122
|
terraform/*.tfstate
|
|
@@ -130,17 +131,17 @@ terraform/*.auto.tfvars
|
|
|
130
131
|
Thumbs.db
|
|
131
132
|
`;
|
|
132
133
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
134
|
+
const presets = {
|
|
135
|
+
node: '\n# Node.js\nnode_modules/\nnpm-debug.log\nyarn-error.log\n',
|
|
136
|
+
nextjs: '\n# Next.js\nnode_modules/\n.next/\nout/\nbuild/\nnext-env.d.ts\n',
|
|
137
|
+
nuxt: '\n# Nuxt 3\nnode_modules/\n.nuxt/\n.output/\ndist/\n',
|
|
138
|
+
python: '\n# Python\n__pycache__/\n*.py[cod]\n*$py.class\nvenv/\nenv/\n.venv/\n.pytest_cache/\n',
|
|
139
|
+
django: '\n# Django\n*.log\n*.pot\n*.pyc\n__pycache__/\ndb.sqlite3\nmedia/\n',
|
|
140
|
+
go: '\n# Go\n/bin/\n/pkg/\n/obj/\n*.exe\n*.exe~*\n*.dll\n*.so\n*.dylib\n',
|
|
141
|
+
rails: '\n# Rails\n/*.log\n/tmp/\n/log/\n/public/system/\n/public/assets/\n/vendor/bundle/\n',
|
|
142
|
+
static: '\n# Static Sites\nnode_modules/\ndist/\nbuild/\nout/\n.output/\n.cache/\npublic/\n'
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const frameworkIgnore = presets[framework] || '';
|
|
146
|
+
return (baseIgnore + frameworkIgnore).trim();
|
|
147
|
+
}
|
|
@@ -65,8 +65,8 @@ output "z_NEXT_STEP_REQUIRED" {
|
|
|
65
65
|
🚀 INFRASTRUCTURE PROVISIONED SUCCESSFULLY!
|
|
66
66
|
====================================================================
|
|
67
67
|
|
|
68
|
-
Your AWS environment is ready. However, your URLs
|
|
69
|
-
error until your application code is actually deployed.
|
|
68
|
+
Your AWS environment is ready. However, your URLs listed above will
|
|
69
|
+
return an error until your application code is actually deployed.
|
|
70
70
|
|
|
71
71
|
TO DEPLOY YOUR APP:
|
|
72
72
|
1. git add .
|