azk deploy ssh-- remote shellazk deploy full-- restart after updating environment variables
Check /etc/resolver/dev.azk.io equals ip address for docker0
| # To grab site, do something like: | |
| # wget --mirror --convert-links --adjust-extension --page-requisites --span-hosts --domains 1.bp.blogspot.com,2.bp.blogspot.com,3.bp.blogspot.com,4.bp.blogspot.com,myblog.blogspot.com, http://myblog.blogspot.com/ -P pass_01 | |
| require 'date' | |
| require 'fileutils' | |
| require 'kramdown' | |
| require 'logger' | |
| require 'nokogiri' | |
| require 'rake' | |
| require 'sanitize' |
| # First grab the remote site | |
| # wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://yourdomain.co.uk | |
| # If you have images hosted on another site then do | |
| # wget --mirror --convert-links --adjust-extension --page-requisites --span-hosts --domains mydomain.com,imagehostingcdn.com https://mydomain.com | |
| # Then have a look how many lines to trim from beginning and end | |
| htmls = Dir.glob('/**/*.html') | |
| htmls.each do |file| | |
| # Change numbers to how many lines you want to trim |
| FROM ruby:2.4.0 | |
| RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
| RUN mkdir /gofg-db | |
| WORKDIR /gofg-db | |
| ADD Gemfile /gofg-db/Gemfile | |
| ADD Gemfile.lock /gofg-db/Gemfile.lock | |
| RUN bundle install | |
| ADD . /gofg-db | |
| ENTRYPOINT ["/gofg-db/docker-entry.sh"] |
| # Creating a Digital Ocean droplet running Rails + Postgres with persistant storage and https | |
| #-------------------------------------------------------------------------------------------- | |
| # For your ctrl-D pleasure... | |
| # SERVER_IP | |
| # APP_NAME | |
| # RAILS_SECRET (generate with `rails secret`) | |
| # ADMIN_EMAIL | |
| # A couple of helper functions | |
| # This one converts country strings to Spree::Country objects. | |
| def convert_countries(countries) | |
| log = "" | |
| output = [] | |
| countries.each do |country| | |
| spree_country = Spree::Country.find_by(name: country) | |
| if spree_country.nil? | |
| spree_country = Spree::Country.find_by("name like ?", "%#{country}%") |
| Started PATCH "/shop/checkout/update/address" for 127.0.0.1 at 2016-10-19 11:02:58 +0100 | |
| Processing by Spree::CheckoutController#update as HTML | |
| Parameters: {"utf8"=>"✓", "authenticity_token"=>"Wr4CSN3bs2Ft8GeveWat+eKqjkcjR7pOsDZKYtJWncHShITVJjHV+gWaE3pNGzz94nceB/sX0B45MNKcrUvQ7g==", "order"=>{"email"=>"[email protected]", "state_lock_version"=>"2", "bill_address_attributes"=>{"firstname"=>"Kim", "lastname"=>"Foale", "address1"=>"5 Ribston St", "address2"=>"", "city"=>"Manchester", "country_id"=>"77", "zipcode"=>"M15 5RH", "phone"=>"3423423423432", "id"=>"44"}, "use_billing"=>"1", "ship_address_attributes"=>{"id"=>"45"}}, "commit"=>"Save and Continue", "save_user_address"=>"1", "state"=>"address"} | |
| User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 136]] | |
| Spree::Store Load (0.3ms) SELECT "spree_stores".* FROM "spree_stores" ORDER BY "spree_stores"."id" ASC LIMIT 1 | |
| Spree::Order Load (0.2ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."comple |
| /** | |
| * Documentation: http://docs.azk.io/Azkfile.js | |
| */ | |
| // Adds the systems that shape your system | |
| systems({ | |
| 'taichi-school': { | |
| // Dependent systems | |
| depends: ["postgres"], | |
| // More images: http://images.azk.io | |
| image: {"docker": "azukiapp/ruby:2.3.0"}, |
| Dir.glob('/YOUR_VIDEOS/*.mp4') do |f| | |
| name = File.basename(f, ".*") | |
| len = `ffprobe #{f} -show_entries format=duration -v quiet -of csv="p=0"` | |
| for n in (1..10) | |
| l = len.to_f / 10 * n | |
| `ffmpeg -i #{f} -ss #{l} -v quiet -vframes 1 './preview/#{name}_#{n}.png'` | |
| end | |
| end |