@kithinji/pod 1.0.18 → 1.0.19
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/dist/main.js +61 -1
- package/dist/main.js.map +2 -2
- package/package.json +1 -1
- package/src/docker/docker.ts +61 -0
- package/src/main.ts +1 -1
package/dist/main.js
CHANGED
|
@@ -4409,6 +4409,7 @@ async function restructureProject(cwd, projectName) {
|
|
|
4409
4409
|
}
|
|
4410
4410
|
async function createDockerfile(cwd, projectName) {
|
|
4411
4411
|
const dockerfilePath = path12.join(cwd, projectName, "Dockerfile");
|
|
4412
|
+
const dockerignorePath = path12.join(cwd, projectName, ".dockerignore");
|
|
4412
4413
|
const dockerfile = `FROM node:18-alpine
|
|
4413
4414
|
|
|
4414
4415
|
WORKDIR /app
|
|
@@ -4422,8 +4423,67 @@ COPY . .
|
|
|
4422
4423
|
EXPOSE 8080
|
|
4423
4424
|
|
|
4424
4425
|
CMD ["npm", "run", "dev"]
|
|
4426
|
+
`;
|
|
4427
|
+
const dockerignore = `# Dependencies
|
|
4428
|
+
node_modules
|
|
4429
|
+
npm-debug.log
|
|
4430
|
+
yarn-error.log
|
|
4431
|
+
package-lock.json
|
|
4432
|
+
yarn.lock
|
|
4433
|
+
|
|
4434
|
+
# Environment files
|
|
4435
|
+
.env
|
|
4436
|
+
.env.*
|
|
4437
|
+
|
|
4438
|
+
# Git
|
|
4439
|
+
.git
|
|
4440
|
+
.gitignore
|
|
4441
|
+
|
|
4442
|
+
# IDE
|
|
4443
|
+
.vscode
|
|
4444
|
+
.idea
|
|
4445
|
+
*.swp
|
|
4446
|
+
*.swo
|
|
4447
|
+
*~
|
|
4448
|
+
|
|
4449
|
+
# OS
|
|
4450
|
+
.DS_Store
|
|
4451
|
+
Thumbs.db
|
|
4452
|
+
|
|
4453
|
+
# Testing
|
|
4454
|
+
coverage
|
|
4455
|
+
.nyc_output
|
|
4456
|
+
*.test.js
|
|
4457
|
+
*.spec.js
|
|
4458
|
+
__tests__
|
|
4459
|
+
|
|
4460
|
+
# Build files
|
|
4461
|
+
dist
|
|
4462
|
+
build
|
|
4463
|
+
.next
|
|
4464
|
+
.nuxt
|
|
4465
|
+
|
|
4466
|
+
# Logs
|
|
4467
|
+
logs
|
|
4468
|
+
*.log
|
|
4469
|
+
|
|
4470
|
+
# Documentation
|
|
4471
|
+
README.md
|
|
4472
|
+
docs
|
|
4473
|
+
*.md
|
|
4474
|
+
|
|
4475
|
+
# Docker
|
|
4476
|
+
Dockerfile
|
|
4477
|
+
.dockerignore
|
|
4478
|
+
docker-compose*.yml
|
|
4479
|
+
|
|
4480
|
+
# Misc
|
|
4481
|
+
.cache
|
|
4482
|
+
tmp
|
|
4483
|
+
temp
|
|
4425
4484
|
`;
|
|
4426
4485
|
await fs9.writeFile(dockerfilePath, dockerfile);
|
|
4486
|
+
await fs9.writeFile(dockerignorePath, dockerignore);
|
|
4427
4487
|
}
|
|
4428
4488
|
async function setupProduction(cwd, projectName, services) {
|
|
4429
4489
|
const compose = {
|
|
@@ -4695,7 +4755,7 @@ function printNextSteps(projectName, env, services) {
|
|
|
4695
4755
|
|
|
4696
4756
|
// src/main.ts
|
|
4697
4757
|
var program = new Command();
|
|
4698
|
-
program.name("pod").description("Pod cli tool").version("1.0.
|
|
4758
|
+
program.name("pod").description("Pod cli tool").version("1.0.19");
|
|
4699
4759
|
program.command("new <name>").description("Start a new Pod Project").action(async (name) => {
|
|
4700
4760
|
await addNew(name);
|
|
4701
4761
|
const appDir = path13.resolve(process.cwd(), name);
|