Running Hammy in Docker Compose
Running Hammy in Docker Compose
To run Hammy using Docker Compose, follow these steps:
curl -O https://raw.githubusercontent.com/go-hammy/hammy/main/examples/docker-compose.yaml
docker-compose up
This will download the docker-compose.yaml
file and start
the Hammy service along with any other defined services. The default
configuration maps the local content
directory to the
container's web root, allowing you to easily manage your web content.
Note that while Docker Compose simplifies the deployment process, it does not handle SSL termination. To expose Hammy securely over HTTPS, you will need to set up a reverse proxy or load balancer that can manage SSL certificates and forward traffic to Hammy. This ensures secure communication between clients and your server.
Customizing the Docker Compose Setup
To customize the Hammy setup in Docker Compose, you can modify the
docker-compose.yaml
file to include additional services,
volumes, or configurations. For instance, you might add a database
service or adjust environment variables to suit your deployment needs.
This flexibility allows you to tailor the setup to your specific
requirements.