This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
#!/bin/bash | |
if [ "$1" = "-h" ] || [ -z "$1" ]; then | |
echo "Usage: pass miner's IP address to this script" | |
echo "or pass -h for this message :)" | |
exit 0 | |
fi | |
if [ -z ${1+x} ]; then | |
MINER_IP_USE="$MINER_IP" |
version: "3.3" | |
services: | |
reverse-proxy: | |
image: traefik:latest | |
restart: unless-stopped | |
command: | |
- --api | |
- --providers.docker=true | |
- --entrypoints.web.address=:80 |
version: '3' | |
services: | |
traefik: | |
container_name: traefik | |
image: traefik:v2.0 | |
command: | |
- "--api.insecure=true" | |
- "--providers.docker=true" |
Configuration files for Rails-driven project basic continuous integration using GitHub Actions and GitLab CI. | |
2020, amkisko (Andrei Makarov). |
version: "3.3" | |
services: | |
reverse-proxy: | |
image: traefik:latest | |
restart: unless-stopped | |
command: | |
- --api | |
- --providers.docker=true | |
- --entrypoints.web.address=:80 |
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 1") |
module Kelder | |
module PrefixKeyWithToken | |
# Prefix all generated blob keys with the tenant. Do not | |
# use slash as a delimiter because it needs different escaping | |
# depending on the storage service adapter - in some cases it | |
# might be significant, in other cases it might get escaped as a path | |
# component etc. | |
def generate_unique_secure_token | |
tenant_slug = Apartment::Tenant.current.split('_').last | |
"#{tenant_slug}-#{super}" |
# This works best in 2019 forward because its basically the code from the gem itself with some tweaks added: | |
# https://github.com/teamcapybara/capybara/blob/master/lib/capybara/registrations/drivers.rb | |
# The additional option/flags work for me but you probebly want to checkout what you would need here first: | |
# https://peter.sh/experiments/chromium-command-line-switches/ | |
Capybara.register_driver :selenium_chrome_headless do |app| | |
# Capybara::Selenium::Driver.load_selenium | |
browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts| | |
opts.args << '--window-size=1920,1080' |
FROM fluent/fluentd:v1.3-1 | |
# Use root account to use apk | |
USER root | |
# below RUN includes plugin as examples elasticsearch is not required | |
# you may customize including plugins as you wish | |
RUN apk add --no-cache --update --virtual .build-deps \ | |
build-base ruby-dev \ | |
&& gem install \ |