A command line tool for syncing with DigitalOcean Spaces or Amazon S3
I'm using this in the context of .gitignore'ing Assets from a Statamic site.
DigitalOcean Spaces with s3cmd
- Install
s3cmd
to interact with Spaces
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<Rule> | |
<ID>Prune files starting with backup- after 1 days</ID> | |
<Prefix>assets/backup-</Prefix> | |
<Status>Enabled</Status> | |
<Expiration> | |
<Days>1</Days> | |
</Expiration> | |
</Rule> | |
</LifecycleConfiguration> |
location / { | |
proxy_pass http://localhost:3000/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} |
A command line tool for syncing with DigitalOcean Spaces or Amazon S3
I'm using this in the context of .gitignore'ing Assets from a Statamic site.
DigitalOcean Spaces with s3cmd
s3cmd
to interact with SpacesCreating and configuring a new site / environment occurs occasionally. Often, to update the underlying server software.
This site has been built with:
php artisan cache:clear # Clear the Laravel application cache. | |
php artisan config:cache # Clear and refresh the Laravel config cache. | |
php artisan route:cache # Clear and refresh the Laravel route cache. | |
php artisan statamic:stache:warm # Warm the Statamic stache. | |
php artisan statamic:search:update --all # Update the search index. | |
php artisan statamic:static:clear # Clear the Statamic static cache (if you use this). | |
#php artisan statamic:static:warm --queue # Warm the Statamic static cache (if you use this). | |
echo 'warming /work ...' | |
curl -# https://example.com/large-page > /dev/null | |
echo '/work is warmed.' |
# Replace location / {...} with this: | |
location / { | |
try_files /static${uri}_${args}.html $uri /index.php?$args; | |
} | |
# Add to bottom just before closing `}`: | |
# Enable gzip compression | |
gzip on; | |
gzip_min_length 1100; | |
gzip_buffers 4 32k; |
# Things for git to not bother with | |
# | |
# To avoid dev code being indexed # | |
robots.txt | |
# | |
# OS generated files # | |
.DS_Store | |
.DS_Store? | |
._* | |
.Spotlight-V100 |
APP_ENV=dev | |
SITE_URL=https://dev.example.co.uk | |
STACHE_ALWAYS_UPDATE=true | |
STATIC_CACHING_ENABLED=false |
APP_ENV=production | |
SITE_URL=https://example.co.uk | |
STACHE_ALWAYS_UPDATE=true | |
STATIC_CACHING_ENABLED=false | |
DEBUG=false | |
DEBUG_BAR=false |
# robotstxt.org/ | |
User-agent: * | |
Disallow: / | |
# Allow Twitter access for validation testing | |
# https://cards-dev.twitter.com/validator | |
User-agent: Twitterbot | |
Disallow: |