打包 (dǎ bāo) internet resources for your air-gapped environment.
- GUI-based
- (Reasonably) Easy Setup
Supports:
- Pivotal Network Stemcells and Releases
- Docker Images
- Helm Repositories & Charts
- Git Repositories
- NPM Packages
Make sure you have docker, docker-compose & MC.
# Clone Repo
git clone https://github.com/yannhowe/dabao.git
# Fill up the .env.example file and rename to .env
mv .env.example .env
# Initialise database & create admin user
docker-compose run --rm dabao-cms python /usr/src/app/manage.py makemigrations
docker-compose run --rm dabao-cms python /usr/src/app/manage.py migrate
docker-compose run --rm dabao-cms python /usr/src/app/manage.py loaddata initial_data.json
docker-compose run --rm dabao-cms python /usr/src/app/manage.py createsuperuser --email [email protected] --username admin
# Get everything up!
docker-compose up -d
# Open your browser:
# Whats being downloaded? - http://localhost
# Admin Panel - http://localhost/admin/
# MinIO endpoint - http://localhost/minio/
# Backup Database
docker-compose run --rm dabao-cms python /usr/src/app/manage.py dumpdata auth django_celery_beat cms
# set bucket permissions in MinIO
mc policy -r set download myminio/docker-images
mc policy -r set download myminio/pivnet-products
# MC Mirror the bucket to your server, thumbdrive, diode, wherever..
mc mirror --watch myminio/docker-images/ docker-images
mc mirror --watch myminio/pivnet-products/ pivnet-products
# Initialise database & create admin user for dev
docker-compose -f docker-compose-dev.yml run --rm dabao-cms python /usr/src/app/manage.py makemigrations
docker-compose -f docker-compose-dev.yml run --rm dabao-cms python /usr/src/app/manage.py migrate
docker-compose -f docker-compose-dev.yml run --rm dabao-cms python /usr/src/app/manage.py loaddata initial_data.json
docker-compose -f docker-compose-dev.yml run --rm dabao-cms python /usr/src/app/manage.py createsuperuser --email [email protected] --username admin
Log in to your pivotal profile and generate your UAA API KEY if you don't already have one and add the UAA API KEY to the .env file
Remember you need to accept the EULA on the website before you are allowed to download using the API!