@fishawack/lab-env 5.1.0 → 5.2.0-beta.2
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/CHANGELOG.md +43 -0
- package/_Test/key.js +7 -2
- package/_Test/provision.js +9 -19
- package/_Test/s3.js +10 -6
- package/adonis/0/docker-compose.yml +2 -0
- package/adonis/0/nginx/CHANGELOG.md +3 -0
- package/adonis/0/nginx/nginx.conf +5 -1
- package/adonis/0/nginx/package.json +2 -2
- package/bitbucket-pipelines.yml +1 -1
- package/cli.js +1 -1
- package/commands/content.js +36 -25
- package/commands/create/cmds/deprovision.js +10 -2
- package/commands/create/cmds/provision.js +13 -2
- package/commands/create/libs/prompts.js +9 -0
- package/commands/create/libs/vars.js +67 -35
- package/commands/create/services/aws/cloudfront.js +17 -20
- package/commands/create/services/aws/ec2.js +2 -3
- package/commands/create/services/aws/elasticbeanstalk.js +11 -14
- package/commands/create/services/aws/iam.js +123 -65
- package/commands/create/services/aws/index.js +35 -35
- package/commands/create/services/aws/misc.js +6 -7
- package/commands/create/services/aws/s3.js +16 -16
- package/commands/create/templates/elasticbeanstalk/.ebextensions/misc/asg-self-healing.config +6 -0
- package/commands/create/templates/elasticbeanstalk/.ebextensions/misc/health-ignore-4xx.config +4 -0
- package/commands/test.js +11 -11
- package/core/0/package.json +1 -1
- package/craftcms/3/apache/package.json +1 -1
- package/craftcms/3/php/package.json +1 -1
- package/drupal/9/apache/package.json +1 -1
- package/drupal/9/php/package.json +1 -1
- package/globals.js +15 -0
- package/laravel/10/docker-compose.yml +2 -0
- package/laravel/8/docker-compose.yml +2 -0
- package/laravel/8/nginx/CHANGELOG.md +3 -0
- package/laravel/8/nginx/nginx.conf +5 -1
- package/laravel/8/nginx/package.json +2 -2
- package/laravel/8/php/package.json +1 -1
- package/laravel/9/docker-compose.yml +2 -0
- package/package.json +1 -1
- package/php/8.2/package.json +1 -1
- package/python/0/Dockerfile +8 -0
- package/python/0/docker-compose.yml +4 -1
- package/python/0/package.json +11 -0
- package/wordpress/0/package.json +1 -1
- package/wordpress/1/apache/package.json +1 -1
- package/wordpress/1/php/package.json +1 -1
|
@@ -62,23 +62,20 @@ module.exports.clients = [
|
|
|
62
62
|
|
|
63
63
|
module.exports.static = async (
|
|
64
64
|
name,
|
|
65
|
-
account,
|
|
66
65
|
tags = [],
|
|
67
66
|
credentials = [],
|
|
68
67
|
repo,
|
|
69
68
|
branch,
|
|
70
69
|
) => {
|
|
71
|
-
let s3 = await module.exports.s3.createS3Bucket(name,
|
|
70
|
+
let s3 = await module.exports.s3.createS3Bucket(name, tags);
|
|
72
71
|
|
|
73
72
|
let cloudfront =
|
|
74
73
|
await module.exports.cloudfront.createCloudFrontDistribution(
|
|
75
74
|
name,
|
|
76
|
-
account,
|
|
77
75
|
tags,
|
|
78
76
|
(
|
|
79
77
|
await module.exports.cloudfront.createCloudFrontFunction(
|
|
80
78
|
name,
|
|
81
|
-
account,
|
|
82
79
|
credentials.length
|
|
83
80
|
? "aws-cloudfront-auth"
|
|
84
81
|
: "aws-cloudfront-simple",
|
|
@@ -92,8 +89,11 @@ module.exports.static = async (
|
|
|
92
89
|
).FunctionSummary.FunctionMetadata.FunctionARN,
|
|
93
90
|
(
|
|
94
91
|
await module.exports.cloudfront.createCloudFrontFunction(
|
|
95
|
-
module.exports.slug(
|
|
96
|
-
|
|
92
|
+
module.exports.slug(
|
|
93
|
+
`${repo}-response`,
|
|
94
|
+
process.env.AWS_PROFILE,
|
|
95
|
+
branch,
|
|
96
|
+
),
|
|
97
97
|
"aws-cloudfront-response",
|
|
98
98
|
{},
|
|
99
99
|
)
|
|
@@ -102,7 +102,6 @@ module.exports.static = async (
|
|
|
102
102
|
|
|
103
103
|
await module.exports.s3.setS3BucketPolicy(
|
|
104
104
|
name,
|
|
105
|
-
account,
|
|
106
105
|
cloudfront.Distribution.DistributionConfig.Origins.Items[0].S3OriginConfig.OriginAccessIdentity.split(
|
|
107
106
|
"origin-access-identity/cloudfront/",
|
|
108
107
|
)[1],
|
|
@@ -117,38 +116,34 @@ module.exports.static = async (
|
|
|
117
116
|
return config;
|
|
118
117
|
};
|
|
119
118
|
|
|
120
|
-
module.exports.staticTerminate = async (name,
|
|
119
|
+
module.exports.staticTerminate = async (name, repo, branch, id) => {
|
|
121
120
|
try {
|
|
122
|
-
await module.exports.s3.emptyS3Bucket(name
|
|
121
|
+
await module.exports.s3.emptyS3Bucket(name);
|
|
123
122
|
} catch {
|
|
124
123
|
/* empty */
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
try {
|
|
128
|
-
await module.exports.s3.removeS3Bucket(name
|
|
127
|
+
await module.exports.s3.removeS3Bucket(name);
|
|
129
128
|
} catch {
|
|
130
129
|
/* empty */
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
try {
|
|
134
|
-
await module.exports.cloudfront.removeCloudFrontDistribution(
|
|
135
|
-
id,
|
|
136
|
-
account,
|
|
137
|
-
);
|
|
133
|
+
await module.exports.cloudfront.removeCloudFrontDistribution(id);
|
|
138
134
|
} catch {
|
|
139
135
|
/* empty */
|
|
140
136
|
}
|
|
141
137
|
|
|
142
138
|
try {
|
|
143
|
-
await module.exports.cloudfront.removeCloudFrontFunction(name
|
|
139
|
+
await module.exports.cloudfront.removeCloudFrontFunction(name);
|
|
144
140
|
} catch {
|
|
145
141
|
/* empty */
|
|
146
142
|
}
|
|
147
143
|
|
|
148
144
|
try {
|
|
149
145
|
await module.exports.cloudfront.removeCloudFrontFunction(
|
|
150
|
-
module.exports.slug(`${repo}-response`,
|
|
151
|
-
account,
|
|
146
|
+
module.exports.slug(`${repo}-response`, branch),
|
|
152
147
|
);
|
|
153
148
|
} catch {
|
|
154
149
|
/* empty */
|
|
@@ -157,43 +152,46 @@ module.exports.staticTerminate = async (name, account, repo, branch, id) => {
|
|
|
157
152
|
|
|
158
153
|
module.exports.fullstack = async (
|
|
159
154
|
name,
|
|
160
|
-
account,
|
|
161
155
|
tags = [],
|
|
162
156
|
credentials = [],
|
|
163
157
|
repo,
|
|
164
158
|
branch,
|
|
165
159
|
framework,
|
|
166
160
|
availability,
|
|
161
|
+
database = false,
|
|
167
162
|
) => {
|
|
168
163
|
const { platform, language } = eb.configurations[framework];
|
|
169
164
|
|
|
170
|
-
const s3Slug = module.exports.slug(
|
|
165
|
+
const s3Slug = module.exports.slug(
|
|
166
|
+
repo,
|
|
167
|
+
process.env.AWS_PROFILE,
|
|
168
|
+
branch,
|
|
169
|
+
"s3",
|
|
170
|
+
);
|
|
171
171
|
|
|
172
|
-
await module.exports.iam.createIAMUser(s3Slug,
|
|
172
|
+
await module.exports.iam.createIAMUser(s3Slug, tags);
|
|
173
173
|
await module.exports.iam.attachIAMPolicy(
|
|
174
174
|
s3Slug,
|
|
175
|
-
account,
|
|
176
175
|
"arn:aws:iam::aws:policy/AmazonS3FullAccess",
|
|
177
176
|
);
|
|
178
177
|
const {
|
|
179
178
|
AccessKey: { AccessKeyId },
|
|
180
179
|
AccessKey: { SecretAccessKey },
|
|
181
|
-
} = await module.exports.iam.createAccessKey(s3Slug
|
|
180
|
+
} = await module.exports.iam.createAccessKey(s3Slug);
|
|
182
181
|
|
|
183
182
|
await module.exports.s3.createS3Bucket(
|
|
184
183
|
s3Slug,
|
|
185
|
-
account,
|
|
186
184
|
tags,
|
|
187
185
|
false,
|
|
188
186
|
"BucketOwnerPreferred",
|
|
189
187
|
);
|
|
190
188
|
|
|
191
|
-
await module.exports.iam.ensureEBInstanceProfileExists(
|
|
189
|
+
await module.exports.iam.ensureEBInstanceProfileExists();
|
|
190
|
+
await module.exports.iam.ensureEBManagedUpdateProfileExists();
|
|
192
191
|
|
|
193
192
|
try {
|
|
194
193
|
await module.exports.elasticbeanstalk.createElasticBeanstalkApplication(
|
|
195
194
|
repo,
|
|
196
|
-
account,
|
|
197
195
|
);
|
|
198
196
|
} catch {
|
|
199
197
|
/* empty */
|
|
@@ -202,7 +200,7 @@ module.exports.fullstack = async (
|
|
|
202
200
|
let hasKeyPair = false;
|
|
203
201
|
|
|
204
202
|
try {
|
|
205
|
-
await module.exports.ec2.getKeyPair("id_rsa_prev"
|
|
203
|
+
await module.exports.ec2.getKeyPair("id_rsa_prev");
|
|
206
204
|
hasKeyPair = true;
|
|
207
205
|
} catch {
|
|
208
206
|
/* empty */
|
|
@@ -214,7 +212,7 @@ module.exports.fullstack = async (
|
|
|
214
212
|
|
|
215
213
|
const OptionSettings = eb.merge(
|
|
216
214
|
"environments",
|
|
217
|
-
{ framework, availability, platform, language },
|
|
215
|
+
{ framework, availability, platform, language, database },
|
|
218
216
|
{ s3Slug, AccessKeyId, SecretAccessKey },
|
|
219
217
|
);
|
|
220
218
|
|
|
@@ -229,7 +227,6 @@ module.exports.fullstack = async (
|
|
|
229
227
|
const environment =
|
|
230
228
|
await module.exports.elasticbeanstalk.createElasticBeanstalkEnvironment(
|
|
231
229
|
name,
|
|
232
|
-
account,
|
|
233
230
|
{ framework, availability, platform, language },
|
|
234
231
|
repo,
|
|
235
232
|
OptionSettings,
|
|
@@ -283,23 +280,28 @@ module.exports.fullstack = async (
|
|
|
283
280
|
return config;
|
|
284
281
|
};
|
|
285
282
|
|
|
286
|
-
module.exports.fullstackTerminate = async (name,
|
|
287
|
-
const s3Slug = module.exports.slug(
|
|
283
|
+
module.exports.fullstackTerminate = async (name, repo, branch) => {
|
|
284
|
+
const s3Slug = module.exports.slug(
|
|
285
|
+
repo,
|
|
286
|
+
process.env.AWS_PROFILE,
|
|
287
|
+
branch,
|
|
288
|
+
"s3",
|
|
289
|
+
);
|
|
288
290
|
|
|
289
291
|
try {
|
|
290
|
-
await module.exports.iam.removeIAMUser(s3Slug
|
|
292
|
+
await module.exports.iam.removeIAMUser(s3Slug);
|
|
291
293
|
} catch {
|
|
292
294
|
/* empty */
|
|
293
295
|
}
|
|
294
296
|
|
|
295
297
|
try {
|
|
296
|
-
await module.exports.s3.emptyS3Bucket(s3Slug
|
|
298
|
+
await module.exports.s3.emptyS3Bucket(s3Slug);
|
|
297
299
|
} catch {
|
|
298
300
|
/* empty */
|
|
299
301
|
}
|
|
300
302
|
|
|
301
303
|
try {
|
|
302
|
-
await module.exports.s3.removeS3Bucket(s3Slug
|
|
304
|
+
await module.exports.s3.removeS3Bucket(s3Slug);
|
|
303
305
|
} catch {
|
|
304
306
|
/* empty */
|
|
305
307
|
}
|
|
@@ -307,7 +309,6 @@ module.exports.fullstackTerminate = async (name, account, repo, branch) => {
|
|
|
307
309
|
try {
|
|
308
310
|
await module.exports.elasticbeanstalk.removeElasticBeanstalkEnvironment(
|
|
309
311
|
name,
|
|
310
|
-
account,
|
|
311
312
|
);
|
|
312
313
|
} catch {
|
|
313
314
|
/* empty */
|
|
@@ -316,7 +317,6 @@ module.exports.fullstackTerminate = async (name, account, repo, branch) => {
|
|
|
316
317
|
try {
|
|
317
318
|
await module.exports.elasticbeanstalk.removeElasticBeanstalkApplication(
|
|
318
319
|
repo,
|
|
319
|
-
account,
|
|
320
320
|
);
|
|
321
321
|
} catch {
|
|
322
322
|
/* empty */
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
module.exports.
|
|
1
|
+
module.exports.setAWSClientDefaults = (
|
|
2
|
+
account = "fishawack",
|
|
3
|
+
region = "us-east-1",
|
|
4
|
+
) => {
|
|
2
5
|
delete process.env.AWS_PROFILE;
|
|
3
6
|
delete process.env.AWS_REGION;
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
process.env.AWS_REGION = region;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return new client({ region });
|
|
8
|
+
process.env.AWS_PROFILE = account;
|
|
9
|
+
process.env.AWS_REGION = region;
|
|
11
10
|
};
|
|
@@ -12,16 +12,14 @@ const {
|
|
|
12
12
|
DeleteObjectsCommand,
|
|
13
13
|
} = require("@aws-sdk/client-s3");
|
|
14
14
|
const { Spinner } = require("../../libs/utilities");
|
|
15
|
-
const { createClient } = require("./misc.js");
|
|
16
15
|
|
|
17
16
|
module.exports.createS3Bucket = async (
|
|
18
17
|
bucket,
|
|
19
|
-
account,
|
|
20
18
|
tags = [],
|
|
21
19
|
blockAccess = true,
|
|
22
20
|
ObjectOwnership = "BucketOwnerEnforced",
|
|
23
21
|
) => {
|
|
24
|
-
const client =
|
|
22
|
+
const client = new S3Client({});
|
|
25
23
|
|
|
26
24
|
let res = await Spinner.prototype.simple(
|
|
27
25
|
`Creating s3 bucket ${bucket}`,
|
|
@@ -54,7 +52,9 @@ module.exports.createS3Bucket = async (
|
|
|
54
52
|
new PutBucketTaggingCommand({
|
|
55
53
|
Bucket: bucket,
|
|
56
54
|
Tagging: {
|
|
57
|
-
TagSet: [
|
|
55
|
+
TagSet: [
|
|
56
|
+
{ Key: "client", Value: process.env.AWS_PROFILE },
|
|
57
|
+
].concat(tags),
|
|
58
58
|
},
|
|
59
59
|
}),
|
|
60
60
|
);
|
|
@@ -63,8 +63,8 @@ module.exports.createS3Bucket = async (
|
|
|
63
63
|
return res;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
module.exports.listS3Buckets = async (
|
|
67
|
-
const client =
|
|
66
|
+
module.exports.listS3Buckets = async () => {
|
|
67
|
+
const client = new S3Client({});
|
|
68
68
|
|
|
69
69
|
let res = await Spinner.prototype.simple(`Listing s3 buckets`, () => {
|
|
70
70
|
return client.send(new ListBucketsCommand({}));
|
|
@@ -73,16 +73,16 @@ module.exports.listS3Buckets = async (account) => {
|
|
|
73
73
|
return res;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
module.exports.removeS3Bucket = async (bucket
|
|
77
|
-
const client =
|
|
76
|
+
module.exports.removeS3Bucket = async (bucket) => {
|
|
77
|
+
const client = new S3Client({});
|
|
78
78
|
|
|
79
79
|
await Spinner.prototype.simple(`Removing s3 bucket ${bucket}`, () => {
|
|
80
80
|
return client.send(new DeleteBucketCommand({ Bucket: bucket }));
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
module.exports.setS3BucketPolicy = async (bucket,
|
|
85
|
-
const client =
|
|
84
|
+
module.exports.setS3BucketPolicy = async (bucket, OAI) => {
|
|
85
|
+
const client = new S3Client({});
|
|
86
86
|
|
|
87
87
|
let res = await Spinner.prototype.simple(
|
|
88
88
|
`Updating s3 bucket policy`,
|
|
@@ -116,8 +116,8 @@ module.exports.setS3BucketPolicy = async (bucket, account, OAI) => {
|
|
|
116
116
|
return res;
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
module.exports.addFileToS3Bucket = async (bucket,
|
|
120
|
-
const client =
|
|
119
|
+
module.exports.addFileToS3Bucket = async (bucket, filepath, file) => {
|
|
120
|
+
const client = new S3Client({});
|
|
121
121
|
|
|
122
122
|
let res = await Spinner.prototype.simple(`Adding file to s3 bucket`, () => {
|
|
123
123
|
return client.send(
|
|
@@ -132,8 +132,8 @@ module.exports.addFileToS3Bucket = async (bucket, account, filepath, file) => {
|
|
|
132
132
|
return res;
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
module.exports.removeFileToS3Bucket = async (bucket,
|
|
136
|
-
const client =
|
|
135
|
+
module.exports.removeFileToS3Bucket = async (bucket, filepath) => {
|
|
136
|
+
const client = new S3Client({});
|
|
137
137
|
|
|
138
138
|
let res = await Spinner.prototype.simple(
|
|
139
139
|
`Removing file from s3 bucket`,
|
|
@@ -150,8 +150,8 @@ module.exports.removeFileToS3Bucket = async (bucket, account, filepath) => {
|
|
|
150
150
|
return res;
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
module.exports.emptyS3Bucket = async (bucket
|
|
154
|
-
const client =
|
|
153
|
+
module.exports.emptyS3Bucket = async (bucket) => {
|
|
154
|
+
const client = new S3Client({});
|
|
155
155
|
|
|
156
156
|
await Spinner.prototype.simple(`Emptying s3 bucket`, () => {
|
|
157
157
|
// eslint-disable-next-line no-async-promise-executor
|
package/commands/create/templates/elasticbeanstalk/.ebextensions/misc/health-ignore-4xx.config
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
option_settings:
|
|
2
|
+
- namespace: aws:elasticbeanstalk:healthreporting:system
|
|
3
|
+
option_name: ConfigDocument
|
|
4
|
+
value: '{"Version":1,"CloudWatchMetrics":{"Instance":{},"Environment":{}},"Rules":{"Environment":{"Application":{"ApplicationRequests4xx":{"Enabled":false}},"ELB":{"ELBRequests4xx":{"Enabled":false}}}}}'
|
package/commands/test.js
CHANGED
|
@@ -6,21 +6,21 @@ module.exports = [
|
|
|
6
6
|
() => {},
|
|
7
7
|
() => {
|
|
8
8
|
_.up(() => {
|
|
9
|
+
_.command(
|
|
10
|
+
"core",
|
|
11
|
+
`${process.env.VERSION === "0" ? "xvfb-run " : ""}npm run test`,
|
|
12
|
+
);
|
|
13
|
+
|
|
9
14
|
if (_.platform === "python") {
|
|
10
15
|
_.command("python", `uv run pytest -o log_cli=true`);
|
|
11
|
-
}
|
|
12
|
-
_.command(
|
|
13
|
-
"core",
|
|
14
|
-
`${process.env.VERSION === "0" ? "xvfb-run " : ""}npm run test`,
|
|
15
|
-
);
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
if (_.platform === "laravel") {
|
|
19
|
+
_.command("php", `php artisan test`);
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
22
|
+
if (_.platform === "adonis") {
|
|
23
|
+
_.command("node", `node ace test`);
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
},
|
package/core/0/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the @fishawack/core npm module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker build --platform linux/amd64 -t fishawack/core:$npm_package_version -t fishawack/core:latest . && docker push fishawack/core:$npm_package_version && docker push fishawack/core:latest && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker build --platform linux/amd64 -t fishawack/core:$npm_package_version -t fishawack/core:latest . && docker push fishawack/core:$npm_package_version && docker push fishawack/core:latest && git add . && git commit -m \"build: bumped core to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the apache module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-craftcms-3-apache:$npm_package_version -t fishawack/lab-env-craftcms-3-apache:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-craftcms-3-apache:$npm_package_version -t fishawack/lab-env-craftcms-3-apache:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-craftcms-3-apache to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the php module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-craftcms-3-php:$npm_package_version -t fishawack/lab-env-craftcms-3-php:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-craftcms-3-php:$npm_package_version -t fishawack/lab-env-craftcms-3-php:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-craftcms-3-php to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the apache module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-drupal-9-apache:$npm_package_version -t fishawack/lab-env-drupal-9-apache:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-drupal-9-apache:$npm_package_version -t fishawack/lab-env-drupal-9-apache:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-drupal-9-apache to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the php module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-drupal-9-php:$npm_package_version -t fishawack/lab-env-drupal-9-php:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-drupal-9-php:$npm_package_version -t fishawack/lab-env-drupal-9-php:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-drupal-9-php to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
package/globals.js
CHANGED
|
@@ -384,6 +384,8 @@ process.env.FW_LARAVEL_10_PHP_IMAGE =
|
|
|
384
384
|
process.env.FW_ADONIS_0_NGINX_IMAGE =
|
|
385
385
|
process.env.FW_ADONIS_0_NGINX_IMAGE || `fishawack/lab-env-adonis-0-nginx`;
|
|
386
386
|
process.env.FW_ADONIS_0_NODE_IMAGE = process.env.FW_ADONIS_0_NODE_IMAGE || ``;
|
|
387
|
+
process.env.FW_PYTHON_0_IMAGE =
|
|
388
|
+
process.env.FW_PYTHON_0_IMAGE || `fishawack/lab-env-python-0`;
|
|
387
389
|
|
|
388
390
|
var core = `-f ${__dirname}/core/${process.env.VERSION}/docker-compose.yml`;
|
|
389
391
|
|
|
@@ -445,6 +447,9 @@ process.env.FW_ADONIS_0_NGINX_VERSION =
|
|
|
445
447
|
require("./adonis/0/nginx/package.json").version;
|
|
446
448
|
process.env.FW_ADONIS_0_NODE_VERSION =
|
|
447
449
|
process.env.FW_ADONIS_0_NODE_VERSION || "";
|
|
450
|
+
process.env.FW_PYTHON_0_VERSION =
|
|
451
|
+
process.env.FW_PYTHON_0_VERSION ||
|
|
452
|
+
require("./python/0/package.json").version;
|
|
448
453
|
|
|
449
454
|
// Map docker contexts
|
|
450
455
|
process.env.FW_CORE_1_CONTEXT =
|
|
@@ -522,6 +527,16 @@ if (existsSync(path.join(contextOverride, "Dockerfile"))) {
|
|
|
522
527
|
).version;
|
|
523
528
|
}
|
|
524
529
|
|
|
530
|
+
// PYTHON
|
|
531
|
+
process.env.FW_PYTHON_0_CONTEXT =
|
|
532
|
+
process.env.FW_PYTHON_0_CONTEXT || `${__dirname}/python/0/`;
|
|
533
|
+
|
|
534
|
+
contextOverride = path.join(cwd, "_Docker/python/0/");
|
|
535
|
+
if (existsSync(path.join(contextOverride, "Dockerfile"))) {
|
|
536
|
+
process.env.FW_PYTHON_0_CONTEXT = contextOverride;
|
|
537
|
+
process.env.FW_PYTHON_0_IMAGE += `-${repoSafe}`;
|
|
538
|
+
}
|
|
539
|
+
|
|
525
540
|
// Copy env.example if .env doesnt exist
|
|
526
541
|
if (
|
|
527
542
|
existsSync(path.join(cwd, ".env.example")) &&
|
|
@@ -13,6 +13,9 @@ server {
|
|
|
13
13
|
|
|
14
14
|
charset utf-8;
|
|
15
15
|
|
|
16
|
+
# Docker embedded DNS
|
|
17
|
+
resolver 127.0.0.11 ipv6=off valid=10s;
|
|
18
|
+
|
|
16
19
|
location / {
|
|
17
20
|
try_files $uri $uri/ /index.php?$query_string;
|
|
18
21
|
}
|
|
@@ -23,7 +26,8 @@ server {
|
|
|
23
26
|
error_page 404 /index.php;
|
|
24
27
|
|
|
25
28
|
location ~ \.php$ {
|
|
26
|
-
|
|
29
|
+
set $upstream php:9000;
|
|
30
|
+
fastcgi_pass $upstream;
|
|
27
31
|
include fastcgi_params;
|
|
28
32
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
29
33
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nginx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "lab-env docker config for the nginx module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-laravel-8-nginx:$npm_package_version -t fishawack/lab-env-laravel-8-nginx:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-laravel-8-nginx:$npm_package_version -t fishawack/lab-env-laravel-8-nginx:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-laravel-8-nginx to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the php module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-laravel-8-php:$npm_package_version -t fishawack/lab-env-laravel-8-php:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-laravel-8-php:$npm_package_version -t fishawack/lab-env-laravel-8-php:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-laravel-8-php to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
package/package.json
CHANGED
package/php/8.2/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the php module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-php-8-2:$npm_package_version -t fishawack/lab-env-php-8-2:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-php-8-2:$npm_package_version -t fishawack/lab-env-php-8-2:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-php-8-2 to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "python",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "lab-env docker config for the python module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"preversion": "docker login",
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-python-0:$npm_package_version -t fishawack/lab-env-python-0:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-python-0 to $npm_package_version\""
|
|
8
|
+
},
|
|
9
|
+
"author": "Mike Mellor",
|
|
10
|
+
"license": "ISC"
|
|
11
|
+
}
|
package/wordpress/0/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the wordpress module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-wordpress-0:$npm_package_version -t fishawack/lab-env-wordpress-0:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-wordpress-0:$npm_package_version -t fishawack/lab-env-wordpress-0:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-wordpress-0 to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the apache module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-wordpress-1-apache:$npm_package_version -t fishawack/lab-env-wordpress-1-apache:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-wordpress-1-apache:$npm_package_version -t fishawack/lab-env-wordpress-1-apache:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-wordpress-1-apache to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "lab-env docker config for the php module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preversion": "docker login",
|
|
7
|
-
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-wordpress-1-php:$npm_package_version -t fishawack/lab-env-wordpress-1-php:latest --push . && git add . && git commit -m \"build:
|
|
7
|
+
"postversion": "docker buildx build --target development --platform linux/amd64,linux/arm64 -t fishawack/lab-env-wordpress-1-php:$npm_package_version -t fishawack/lab-env-wordpress-1-php:latest --push . && git add . && git commit -m \"build: bumped fishawack/lab-env-wordpress-1-php to $npm_package_version\""
|
|
8
8
|
},
|
|
9
9
|
"author": "Mike Mellor",
|
|
10
10
|
"license": "ISC"
|