Sinatra app serving Dragonfly assets for Modulor-based websites.
2.7K
Sinatra app serving Dragonfly assets for Modulor-based websites.
Configuration options are passed through env variables.
DRAGONFLY_DATASTORE
mongoid, google
DRAGONFLY_DATASTORE_OPTIONS
DRAGONFLY_SECRET
Has to be identical with your app's secret.
ASSETS_DATASTORE
MODULOR_ASSETS_DATASTORE
file, google
ASSETS_DATASTORE_OPTIONS
MODULOR_ASSETS_DATASTORE_OPTIONS
CHROME_HEADLESS_HOST
CHROME_HEADLESS_PORT
Typically points to chrome_headless container.
Applies only when DRAGONFLY_DATASTORE set to mongoid.
MONGODB_DATABASE
Database name.
MONGODB_URL
Comma-separated list of mongo servers.
bundle exec puma config.ru -C config/puma.rb
Intended to be run as a docker container. Here a corresponding docker-compose (v2) example snippet:
version: '2'
services:
staging_green:
# …
volumes:
- assets_staging:/app/app
- modulor_assets_staging:/app/modulor
asset_server_staging:
image: tomasce/modulor_dragonfly_server:latest
environment:
DRAGONFLY_DATASTORE: mongoid
FONT_ASSETS_DATASTORE: file
FONT_ASSETS_DATASTORE_OPTIONS: "{\"root_path\":\"/assets\"}"
IMAGE_ASSETS_DATASTORE: file
IMAGE_ASSETS_DATASTORE_OPTIONS: "{\"root_path\":\"/modulor_assets\"}"
LETSENCRYPT_EMAIL: [email protected]
LETSENCRYPT_HOST: "krabbesholm-assets.tomascelizna.com"
MONGODB_DATABASE: krabbesholm_staging
MONGODB_URL: mongodb:27017
ORIGIN: "https://krabbesholm.tomascelizna.com"
RACK_ENV: staging
VIRTUAL_HOST: "krabbesholm-assets.tomascelizna.com"
env_file:
- .env
restart: always
volumes:
- ./assets/staging:/app/public/assets
- assets_staging:/assets
- modulor_assets_staging:/modulor_assets
- /tmp/cache/staging:/app/tmp/cache
volumes:
assets_app_staging:
driver: local
assets_vendor_staging:
driver: local
Content type
Image
Digest
Size
1.3 GB
Last updated
over 7 years ago
docker pull tomasce/modulor_dragonfly_server