Skip to content

Instantly share code, notes, and snippets.

@liuggio
Created April 19, 2012 12:53
Show Gist options
  • Save liuggio/2420800 to your computer and use it in GitHub Desktop.
Save liuggio/2420800 to your computer and use it in GitHub Desktop.
Symfony2 assets on RackSpace Cloud files [config.yml, parameter.ini]
framework:
# ...
templating:
# ...
packages:
## if you want to redirect just some asset remember to add also into twig file the package='rscf'
rscf:
base_urls: [%rackspace_container_url%]
## or use the generic:
# assets_base_urls:
# - %rackspace_container_url%
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
write_to: %rackspace_protocol%://%rackspace_container_name%
java: /usr/bin/java
filters:
cssrewrite: ~
cssembed:
jar: %kernel.root_dir%/Resources/java/cssembed-0.3.6.jar
closure:
jar: %kernel.root_dir%/Resources/java/compiler.jar
yui_css:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
yui_js:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
liuggio_rackspace_cloud_files:
service_class: Liuggio\RackspaceCloudFilesStreamWrapper\StreamWrapper\RackspaceCloudFilesStreamWrapper
stream_wrapper:
register: true
# protocol_name: rscf
# class: Liuggio\StreamWrapper\RackspaceCloudFilesStreamWrapper
auth:
authentication_class: CF_Authentication
connection_class: CF_Connection
username: %rackspace_username%
api_key: %rackspace_api_key%
host: %rackspace_host%
#account:
#servicenet: true
[parameters]
...
rackspace_container_url='THE CONTAINER PUBLIC URL'
rackspace_username='YOUR USERNAME'
rackspace_api_key='YOUR API KEY'
rackspace_host='https://lon.auth.api.rackspacecloud.com'
rackspace_protocol='rscf'
rackspace_container_name='YOUR-CONTAINER-NAME'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment