Skip to content

Docker

A Docker solution is available for both development and production deployment.

  1. Create a new container.

    Terminal window
    git clone git@github.com:cmjoseph07/frizzante-docker.git
    cd frizzante-docker
    docker compose build --pull --no-cache
  2. Start the container.

    Terminal window
    docker compose up -d
  3. Attach to this container with your IDE or directly with a shell.

    Terminal window
    docker exec -it frizzante-start sh
  4. Start development.

    Terminal window
    make dev
  5. Build.

    Terminal window
    make build

    This will create a .gen/bin/app standalone executable.

    • Directory.gen
      • Directorybin
        • app

You have different options for deploying to the production environment using docker.

  1. Build and run production binary inside container

    Terminal window
    # Inside the container
    make build
    ./.gen/bin/app
  2. Build production Docker image

    Terminal window
    docker build --target frizzante_prod -t my-app:prod .
    docker run -p 8080:8080 my-app:prod
  3. Use Docker Compose for production

    Terminal window
    docker compose -f compose.yaml -f compose.prod.yaml up -d --build