📦 Search for Gleam packages on Hex.
A Gleam application using the Wisp web framework, served with the Mist web server, using a Stóráil database.
The application is configured with a series of environment variables.
HEX_API_KEY
- Required. A read-only API key for the Hex API. You can generate one via the Hex dashboard.DATABASE_PATH
- A path where the Stóráil database will be stored. Defaults to./storage
.
Install Gleam! See ./Dockerfile
for which version is used in production.
gleam test # Run the tests
gleam run server # Run the server
[Unit]
Description=My Gleam web application
After=local-fs.target
[Container]
Image=ghcr.io/gleam-lang/packages:main
# Make podman-auto-update.service update it when there's a new image version
AutoUpdate=registry
# Expose the port the app is listening on
PublishPort=3000:3000
# Mount the storage
Volume=/srv/packages-storage:/storage:rw,z
Environment=DATABASE_PATH=/storage
# Provide the secrets
EnvironmentFile=/srv/packages-environment
[Install]
WantedBy=multi-user.target default.target