Services
Galaxy Web UI
Web interface at http://localhost:8080
Galaxy API
REST API at http://localhost:8000/api/galaxy/
Galaxy Content
Content service at http://localhost:24816
PostgreSQL
Database at localhost:5432
Redis
Cache at localhost:6379
Galaxy Worker
Background task worker (scalable)
Quick Start
git clone https://github.com/AndrewDi/ansible-galaxy-compose.git
cd ansible-galaxy-compose
cp .env.example .env
mkdir -p certs
python3 -c "import os; print(os.urandom(32).hex())" > certs/database_fields.symmetric.key
chmod 600 certs/database_fields.symmetric.key
docker compose up -d
docker compose ps
Default Ports
| Service |
Port |
URL |
| Galaxy Web |
8080 |
http://localhost:8080 |
| Galaxy API |
8000 |
http://localhost:8000/api/galaxy/ |
| Galaxy Content |
24816 |
http://localhost:24816/pulp/content/ |
| PostgreSQL |
5432 |
localhost:5432 |
| Redis |
6379 |
localhost:6379 |
Default Credentials
Username: admin
Password: admin
Configuration Files
.env Variables
settings.py
Database Settings
| POSTGRESQL_USER | galaxy | Database username |
| POSTGRESQL_PASSWORD | galaxy | Database password |
| POSTGRESQL_DATABASE | galaxy | Database name |
| POSTGRESQL_HOST | postgres | Database host |
| POSTGRESQL_PORT | 5432 | Database port |
Redis Settings
| REDIS_HOST | redis | Redis host |
| REDIS_PORT | 6379 | Redis port |
| REDIS_PASSWORD | galaxy | Redis password |
Galaxy Admin Settings
| GALAXY_ADMIN_USER | admin | Admin username |
| GALAXY_ADMIN_PASSWORD | admin | Admin password |
API Settings
| GALAXY_API_HOSTNAME | http://galaxy-web.orb.local | Galaxy API hostname |
| GALAXY_CONTENT_HOSTNAME | http://galaxy-web.orb.local | Content hostname |
| CONTENT_ORIGIN | http://galaxy-web.orb.local | Content origin URL |
| GALAXY_API_PATH_PREFIX | api/galaxy | API path prefix |
Feature Flags
| GALAXY_REQUIRE_CONTENT_APPROVAL | True | Require approval before publishing |
| GALAXY_ENABLE_ANONYMOUS_ACCESS | True | Allow anonymous access |
| GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_DOWNLOAD | True | Allow anonymous downloads |
| GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_ACCESS | True | Allow anonymous collection access |
| EE_ENABLED | False | Enable Execution Environments |
| GALAXY_ENABLE_LEGACY_ROLES | True | Enable legacy roles support |
Worker Scaling
| WORKER_REPLICAS | 1 | Number of worker replicas |
Database (DATABASES)
| ENGINE | django.db.backends.postgresql | Database engine |
| NAME | galaxy | Database name |
| USER | galaxy | Database user |
| PASSWORD | galaxy | Database password |
| HOST | postgres | Database host |
| PORT | 5432 | Database port |
| CONN_MAX_AGE | 0 | Connection lifetime (seconds) |
Redis Cache
| REDIS_PASSWORD | galaxy | Redis password |
| REDIS_HOST | redis | Redis host |
| REDIS_PORT | 6379 | Redis port |
| CACHE_URL | redis://:galaxy@redis:6379/0 | Redis connection URL |
Security
| SECRET_KEY | (from PULP_SECRET_KEY) | Django secret key |
| ALLOWED_HOSTS | * | Allowed host patterns |
Storage
| FILE_UPLOAD_MAX_MEMORY_SIZE | 104857600 (100MB) | Max file size in memory |
| DATA_UPLOAD_MAX_MEMORY_SIZE | 524288000 (500MB) | Max data upload size |
Galaxy Settings
| GALAXY_API_DEFAULT_DISTRIBUTION_BASE_PATH | published | Default distribution path |
| GALAXY_API_STAGING_DISTRIBUTION_BASE_PATH | staging | Staging distribution path |
| ANSIBLE_API_HOSTNAME | (from GALAXY_API_HOSTNAME) | API hostname |
| X_PULP_CONTENT_HOST | galaxy-content | Content host |
| X_PULP_CONTENT_PORT | 24816 | Content port |
Feature Flags
| GALAXY_ENABLE_ANONYMOUS_ACCESS | True | Enable anonymous access |
| GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_DOWNLOAD | True | Allow unauthenticated downloads |
| GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_ACCESS | True | Allow unauthenticated collection access |
| GALAXY_REQUIRE_CONTENT_APPROVAL | False | Require content approval |
| GALAXY_ENABLE_LEGACY_ROLES | True | Enable legacy roles |
| GALAXY_DYNAMIC_SETTINGS | True | Enable dynamic settings |
| EE_ENABLED | False | Enable Execution Environments |
ansible-galaxy Command Reference
Collection Commands
ansible-galaxy collection install namespace.collection
ansible-galaxy collection install namespace.collection:1.0.0
ansible-galaxy collection install namespace-collection-1.0.0.tar.gz
ansible-galaxy collection install namespace.collection --server=http://localhost:8000
ansible-galaxy collection list
ansible-galaxy collection build
ansible-galaxy collection publish namespace-collection-1.0.0.tar.gz
ansible-galaxy collection publish namespace-collection-1.0.0.tar.gz \
--server=http://localhost:8000 \
--api-key=YOUR_API_KEY
Role Commands
ansible-galaxy role install namespace.role_name
ansible-galaxy role install namespace.role_name,1.2.0
ansible-galaxy role list
ansible-galaxy role remove namespace.role_name
Galaxy Server Commands
ansible-galaxy login
ansible-galaxy server status
ansible-galaxy server list
Configuration
ansible-galaxy config view
ansible-galaxy config server_list
ansible-galaxy config server_list.test.server_url http://localhost:8000
Example: Full Workflow
ansible-galaxy collection build
ansible-galaxy collection publish galaxy_service-1.0.0.tar.gz \
--server=http://localhost:8000 \
--api-key=YOUR_API_KEY
ansible-galaxy collection install galaxy_service.galaxy_service \
--server=http://localhost:8000
ansible-playbook my_playbook.yml
Storage Volumes
| Volume |
Description |
| postgres_data |
PostgreSQL database |
| galaxy_api_data |
Galaxy artifacts, uploads, and shared data |
GitHub Actions
This project includes automated workflows:
- CI - Continuous integration testing
- Release - Build and publish Galaxy collection
- Scale Test - Test worker scaling capabilities
- Pages - Deploy documentation