This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| LOCAL_HOST=127.0.0.1 | |
| REMOTE_USER=root | |
| REMOTE_HOST=mongoserver.org | |
| REMOTE_PASSWORD=root | |
| REMOTE_DATABASE=test | |
| TABLE_NAME=test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #####on host computer | |
| echo 'SAAS V2' | |
| if [ "$INSTALL" = "true"]; then | |
| mkdir /var/www/html/$SAAS_PROJECT_NAME | |
| chgrp git -R /var/www/html/$SAAS_PROJECT_NAME | |
| chmod 755 -R /var/www/html/$SAAS_PROJECT_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # docker-compose startup script | |
| docker-compose -f /var/www/dockers/compose-local-dev/docker-compose.yml up -d | |
| find /var/www/html -name 'tmp' -exec chmod 777 -R {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #####on host computer | |
| mkdir /etc/ssl/${DOMAIN_NAME} | |
| curl https://gist.githubusercontent.com/bmilesp/933ab244e5d8a6550c84/raw/bfdc41e2c580071584d3f666e362cb407768c9fa/ssl.key > /home/${DOMAIN_NAME}.key | |
| touch /etc/ssl/${DOMAIN_NAME}/${DOMAIN_NAME}.key | |
| chmod 777 /etc/ssl/${DOMAIN_NAME}/${DOMAIN_NAME}.key | |
| cat /home/${DOMAIN_NAME}.key | tee -a /etc/ssl/${DOMAIN_NAME}/${DOMAIN_NAME}.key | |
| curl https://gist.githubusercontent.com/bmilesp/933ab244e5d8a6550c84/raw/bfdc41e2c580071584d3f666e362cb407768c9fa/ssl.key > /etc/ssl/${DOMAIN_NAME}/${DOMAIN_NAME}.key | |
| chmod 644 /etc/ssl/${DOMAIN_NAME}/${DOMAIN_NAME}.key | |
| touch /etc/ssl/${DOMAIN_NAME}/${DOMAIN_NAME}.crt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nginxproxy: | |
| image: jwilder/nginx-proxy | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - /var/run/docker.sock:/tmp/docker.sock | |
| - /etc/ssl/nginxproxy:/etc/nginx/certs | |
| mem_limit: 512m | |
| cpu_shares: 128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #local setup | |
| sudo docker run -t -p 8060:80 -p 4460:443 -v /var/www/html:/var/www/html -v /etc/ssl:/etc/ssl --name users -e SAAS_LOCAL_DEV=no -e SAAS_PROJECT_NAME=users -e DB_DEFAULT_USER=root -e DB_DEFAULT_PASSWORD=root -e DB_DEFAULT_HOST=mysql -e DOMAIN_NAME=users.p --add-host users.p:127.0.0.1 --add-host *.users.p:127.0.0.1 bmilesp/micro-saas; | |
| #production setup | |
| sudo docker run -p 8022:22 -p 80:80 -p 443:443 -v /home/ubuntu/.ssh:/home/git/.ssh -v /var/www/html:/var/www/html -v /etc/ssl:/etc/ssl --name accounts -e SAAS_LOCAL_DEV=no -e SAAS_PROJECT_NAME=accounts -e DB_DEFAULT_USER=root -e DB_DEFAULT_PASSWORD=root -e DB_DEFAULT_HOST=mysql -e DOMAIN_NAME=accounts.undegroundshirts.com -e DOMAIN_NAME_STAGE=accounts-stage.undergroundshirts.com --add-host accounts.undergroundshirts.com:127.0.0.1 --add-host *.accounts.undergroundshirts.com:127.0.0.1 --add-host accounts-stage.undergroundshirts.com:127.0.0.1 --add-host *.accounts-stage.undergroundshirts.com:127.0.0.1 -d bmilesp/micro-saas | |
| sudo docker run -p 0.0.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # must run install.sh before running this script | |
| # NOTE: uses env variable from bmilesp/install.sh | |
| mkdir /var/www/html/$SAAS_PROJECT_NAME | |
| chown ubuntu /var/www/html/$SAAS_PROJECT_NAME | |
| chmod 775 /var/www/html/$SAAS_PROJECT_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "saas", | |
| "minimum-stability": "dev", | |
| "require": { | |
| "cakephp/cakephp": "2.5.4", | |
| "composer/installers": "1.0.18", | |
| "bmilesp/cakephp-post-install": "0.3.9", | |
| "cakephp/debug_kit": "2.2.5", | |
| "cakedc/migrations": "dev-master", | |
| "brianshepanek/cakephp-mongodb": "2.2.*@dev", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| #Basic | |
| s = status | |
| c = checkout | |
| #Flow | |
| fs = flow feature start | |
| ff = flow feature finish | |
| #Infoz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ######################################## | |
| ###rename your project and add domain name here, if you wish. this env variable will be used in the git_project_script.sh file as well | |
| ## to run: | |
| # add -p if production server to install composer,git,etc | |
| # sudo bash install.sh -d access.undergroundshirts.com -s access -u ubuntu -g yes -p yes -x dbadmin -y dbpassword -z dbhost -a saas -n yes | |
| #after script has run | |
| #upload the developer's id_rsa.pub key to /home/ubuntu/.ssh and run: |