Skip to content

Commit

Permalink
docker fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alain committed Jan 3, 2025
1 parent 6b87748 commit 509ae15
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
IMAGE_NAME = pizza-waiter
CUSTOM_PORT ?= 3000

# Build the Docker image for production
build:
docker build --no-cache -t $(IMAGE_NAME):prod -f Dockerfile .

# Run the Docker container for production
prod: build
docker run -d -p $(CUSTOM_PORT):3000 --name $(IMAGE_NAME)_prod $(IMAGE_NAME):prod

# Stop the production container
stop:
docker stop $(IMAGE_NAME)_prod

# Remove the production container
clean:
docker rm $(IMAGE_NAME)_prod

# Remove the production image
clean-image:
docker rmi $(IMAGE_NAME):prod

# Help command to display available targets
help:
@echo "Available targets:"
@echo " build - Build the Docker image for production"
@echo " prod - Run the Docker container for production"
@echo " stop - Stop the production container"
@echo " clean - Remove the production container"
@echo " clean-image - Remove the production image"
@echo " help - Display this help message"

.PHONY: build production stop clean clean-image help
26 changes: 4 additions & 22 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"useDefineForClassFields": true,

"target": "es2022",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist",
"rootDir": "./src",
"sourceMap": true,
"resolveJsonModule": true,

/* Bundler mode */
"moduleResolution": "node",
"isolatedModules": true,
"moduleDetection": "force",
"allowImportingTsExtensions": true,
"noEmit": true,


/* Linting */
"strict": true,

"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true

"resolveJsonModule": true
},
"include": ["src/**/*", "static/**/*"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit 509ae15

Please sign in to comment.