This project consists of a Go backend and a Svelte frontend, containerized using Docker. Follow these instructions to build and run the application.
- Docker installed on your system
- Git (optional, for cloning the repository)
/backend: Go server code/frontend: Svelte frontend code usingbunDockerfile: Multi-stage build configuration
- Clone the repository (if not already done):
git clone <repository-url>- Navigate to the project root directory:
cd <project-directory>- Build the Docker image:
docker build -t clickety-clack .This command creates an image named "clickety-clack" using the multi-stage Dockerfile, which:
- Builds the Svelte frontend using
bun - Compiles the Go backend using Go
- Creates a lightweight Alpine-based final image
Run the container with:
docker run -p 3000:3000 clickety-clack-p 3000:3000: Maps port 3000 on your host to port 3000 in the containerclickety-clack: The name of the image built in the previous step
Once the container is running:
- Open your browser to
http://localhost:3000 - The Go server will serve the static files from the Svelte build
If the container fails to start:
- Check that port 3000 is not in use by another process