Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Use a lightweight Node image
FROM node:18-alpine

# Create app directory
WORKDIR /app

# Copy all files into the container
COPY . .

# Install a static file server globally
RUN npm install -g http-server

# Expose the port http-server runs on
EXPOSE 8080

# Run the server
CMD ["http-server", ".", "-p", "8080"]

9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3.8'

services:
todolist:
build: .
ports:
- "8080:8080"
container_name: todo-app