deploy-stack 0.9.6 → 0.9.8
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
|
@@ -65,7 +65,7 @@ export async function generateTemplates(targetDir, config) {
|
|
|
65
65
|
} else {
|
|
66
66
|
const existingGitignore = await fs.readFile(targetGitignore, 'utf-8');
|
|
67
67
|
if (!existingGitignore.includes('terraform/.terraform/')) {
|
|
68
|
-
const appendIgnore = '\n# Added by deploy-stack (Terraform)\
|
|
68
|
+
const appendIgnore = '\n# Added by deploy-stack (Terraform)\nterraform/.terraform/\nterraform/*.tfstate\nterraform/*.tfstate.backup\nterraform/.terraform.lock.hcl\nterraform/secret_keys.json\n.env\n';
|
|
69
69
|
await fs.appendFile(targetGitignore, appendIgnore);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -77,6 +77,9 @@ export async function generateTemplates(targetDir, config) {
|
|
|
77
77
|
.git/
|
|
78
78
|
.github/
|
|
79
79
|
terraform/
|
|
80
|
+
**/.terraform/
|
|
81
|
+
**/.terraform.*
|
|
82
|
+
**/*.tfstate*
|
|
80
83
|
.env
|
|
81
84
|
README.md
|
|
82
85
|
node_modules/
|
|
@@ -92,11 +95,11 @@ __pycache__/
|
|
|
92
95
|
function getGitignoreContent(framework) {
|
|
93
96
|
const baseIgnore = `
|
|
94
97
|
# Infrastructure (deploy-stack)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
secret_keys.json
|
|
98
|
+
terraform/.terraform/
|
|
99
|
+
terraform/*.tfstate
|
|
100
|
+
terraform/*.tfstate.backup
|
|
101
|
+
terraform/.terraform.lock.hcl
|
|
102
|
+
terraform/secret_keys.json
|
|
100
103
|
.env
|
|
101
104
|
|
|
102
105
|
# OS
|
|
@@ -6,7 +6,10 @@ ENV PYTHONUNBUFFERED=1
|
|
|
6
6
|
|
|
7
7
|
WORKDIR /app
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
# Upgrade Debian OS packages to patch system-level CVEs (like python3-setuptools)
|
|
10
|
+
RUN apt-get update && apt-get upgrade -y && \
|
|
11
|
+
apt-get install -y --no-install-recommends gcc libpq-dev && \
|
|
12
|
+
rm -rf /var/lib/apt/lists/*
|
|
10
13
|
|
|
11
14
|
# Create unprivileged user
|
|
12
15
|
RUN groupadd -g 1001 appgroup && \
|
|
@@ -6,10 +6,14 @@ ENV PYTHONUNBUFFERED=1
|
|
|
6
6
|
|
|
7
7
|
WORKDIR /app
|
|
8
8
|
|
|
9
|
+
# Upgrade Debian OS packages to patch system-level CVEs (like python3-setuptools)
|
|
10
|
+
RUN apt-get update && apt-get upgrade -y && \
|
|
11
|
+
apt-get install -y --no-install-recommends gcc libpq-dev && \
|
|
12
|
+
rm -rf /var/lib/apt/lists/*
|
|
13
|
+
|
|
9
14
|
# Create a non-root user for security compliance
|
|
10
15
|
RUN adduser --disabled-password --gecos '' appuser
|
|
11
16
|
|
|
12
|
-
# Install dependencies without caching to keep the image size small
|
|
13
17
|
COPY requirements.txt .
|
|
14
18
|
|
|
15
19
|
# Upgrade core pip tools to resolve base image CVEs
|