Two containerized Hex package repository/api images for testing and development.
hex_tiny - A lightweight single-image Hex repository server based on the Hex: Self Hosting guide. Provides "repository" functionality.
- Docker Hub: camatcode/hex_tiny
- Port: 8000
hex_beefy - A full-featured test environment running hexpm/hexpm with integrated PostgreSQL database.
- Docker Hub: camatcode/hex_beefy
- Port: 4000
Direct Docker:
docker run -it --network=host camatcode/hex_tiny
# Or specify port: docker run -it -p {port}:8000 camatcode/hex_tiny
Docker Compose:
# Start
docker compose -f docker-compose_tiny.yml up -d
# View logs
docker compose -f docker-compose_tiny.yml logs -f
# Stop
docker compose -f docker-compose_tiny.yml down
Access at: http://localhost:8000/
Direct Docker:
docker run -it --network=host camatcode/hex_beefy
# Or specify port: docker run -it -p {port}:4000 camatcode/hex_beefy
Docker Compose:
# Start
docker compose -f docker-compose_beefy.yml up -d
# View logs
docker compose -f docker-compose_beefy.yml logs -f
# Stop
docker compose -f docker-compose_beefy.yml down
Access at: http://localhost:4000/
Test emails: http://localhost:4000/sent_emails
Test user: With docker tag :with_test_user - username: "test_user" password: "elixir1234" admin for org called "test_org"
Pitfalls:
- If you publish documentation to a package, it will say you published it, but will not store the docs (so you can't retrieve what you posted)
Example usage in GitHub Actions: aura's workflow
I needed this to use as a reference API implementation to execute against (because testing against Hex.pm itself is rude).
My CI/CD in this case is really limited (can't compose or launch services), so everything had to work in one image.