starter-kit/Dockerfile.local
ulflow_phattt2901 d4c11c12be <chore>: Update port 3000 & update makefile
Change port and update makefile for Windows
2025-05-21 15:12:24 +07:00

33 lines
633 B
Docker

# Dockerfile.local
# Optimized for local development with hot reload
# Build stage
FROM golang:1.23-alpine AS builder
# Install necessary tools for development
RUN apk add --no-cache git make gcc libc-dev
# Install Air for hot reload
RUN go install github.com/cosmtrek/air@latest
# Set working directory
WORKDIR /app
# Copy go.mod and go.sum files
COPY go.mod go.sum* ./
# Download dependencies
RUN go mod download
# Copy the entire project
COPY . .
# Expose port
EXPOSE 3000
# Set environment variable for development
ENV APP_ENV=development
# Command to run the application with hot reload
CMD ["air", "-c", ".air.toml"]