Blog Archives - 4 Record(s)

Remove Filter Year: '2017' - Month: '5'

Resize gDrive Images On The Fly

Note: I have taken down the image server used for testing, however everything else here can be used as reference.

![](http://marlin.blusol.io:8080/800x/https://drive.google.com/a/southeastern360.com/uc?id=0By5I5hN7xKMacEhONDVSeUw3RWc)
![](http://marlin.blusol.io:8080/800x/https://drive.google.com/a/southeastern360.com/uc?id=0By5I5hN7xKMabjNoYzRNYXlwNVE)
![](http://marlin.blusol.io:8080/800x/https://drive.google.com/a/southeastern360.com/uc?id=0By5I5hN7xKMaTWNfY29NVnI0WWs)

Resources:

Private S3 Server with Docker+Scality S3 Server

docker run -d \
--name mys3server \
-p 8000:8000 \
-e SCALITY_ACCESS_KEY_ID=myAccessKey \
-e SCALITY_SECRET_ACCESS_KEY=mySuperSecretKey123 \
-v s3data:/usr/src/app/localData \
-v s3metaData:/usr/src/app/localMetadata \
scality/s3server

Connection Options: https://github.com/scality/S3/blob/master/README.md#command-line-tools

I prefer the s3cmd.

Once you configured ~/.s3cfg you here's some commands you can run.

#This will create the bucket webfiles
s3cmd mb s3://webfiles

#This will upload a test.txt file from the mac desktop to the  webfiles bucket.
s3cmd put ~/Desktop/test.txt  s3://webfiles

#This will List All objects (buckets, files inside buckets)
s3cmd la

#This will list all files in the webfiles bucket.
s3cmd ls s3://webfiles

Private Bitbucket Repo's with CommandBox and Mac

ssh-keygen -f ~/.ssh/privatebitbucket -C "privatebitbucket"

Edit the ~/.ssh/config file.

Host privatebitbucket
 HostName bitbucket.org
 IdentityFile ~/.ssh/privatebitbucket

Copy the new key to clipboard to add to bitbucket.

pbcopy < ~/.ssh/privatebitbucket.pub

Login to bitbucket and add the ssh key:

List the currently loaded keys:

$ ssh-add -l

If necessary, add your new key to the list:

$ ssh-add ~/.ssh/privatebitbucket

List the keys again to verify the add was successful:

$ ssh-add -l

   _____                                          _ ____             
  / ____|                                        | |  _ \            
 | |     ___  _ __ ___  _ __ ___   __ _ _ __   __| | |_) | _____  __ 
 | |    / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` |  _ < / _ \ \/ / 
 | |___| (_) | | | | | | | | | | | (_| | | | | (_| | |_) | (_) >  <  
  \_____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|____/ \___/_/\_\   v3.7.0-SNAPSHOT+00685

Welcome to CommandBox!
Type "help" for help, or "help [command]" to be more specific.

CommandBox:you> install git+ssh://git@privatebitbucket:[BITBUCKETUSERNAME]/[privaterepo].git

Docker Swarm + Portainer + mySQL + NGINX + CommandBox/ContentBox

start docker swarm

docker swarm init

add the docker portainer service for easy management

docker service create \
    --name portainer \
    --publish 9000:9000 \
    --constraint 'node.role == manager' \
    --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
    portainer/portainer \
    -H unix:///var/run/docker.sock

login to port 9000, add two named volumes to be used below:

  1. mysqldata
  2. nginx

docker swarm join info coming soon

create overlay network (details coming soon)

This may not be necessary now that I'm running all containers as a service (even though I only have 1 instance running)

add mysql service

docker service create \
--name mysql \
--network bluewater \
-p 3306:3306 \
--mount type=volume,source=mysqldata,target=/var/lib/mysql,readonly=false \
--env MYSQL_ROOT_PASSWORD=superSecretPassword! \
mysql:latest 

You will need to login and create a database.

start docker contentbox image

docker service create \
--name docker_blusol_io \
--network bluewater \
-e 'installer=true' \
-e 'rewrites=true' \
-e 'cfconfig_whitespaceManagement=white-space-pref' \
-e 'cfconfig_adminPassword=superSecretCFMPassword! \
-e "DB_CONNECTION_STRING=jdbc:mysql: //mysql:3306/blusol_docker?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true" \
-e 'DB_CLASS=org.gjt.mm.mysql.Driver' \
-e 'DB_USER=root' \
-e 'DB_PASSWORD=superSecretPassword! \
ortussolutions/contentbox

adding nginx for reverse proxy

docker service create \
--name nginx \
--network bluewater \
-p 80:80 \
-p 443:443 \
--mount type=volume,source=nginx,target=/etc/nginx,readonly=false \
nginx:latest 

/etc/nginx/conf.d/docker.blusol.io.conf

server{
       	listen 80;
        server_name docker.blusol.io;
        location / {
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_pass "http://docker_blusol_io:8080";
        }

}

Resources

https://www.ortussolutions.com/blog/contentbox-docker-image-351-released

http://portainer.io/