This file contains 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
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
root /var/virtual/www | |
index index.php; | |
server_name example.com; | |
charset utf-8; | |
access_log off; | |
location / { |
This file contains 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
# Use only in your development environment, behind a firewall | |
sudo apt-get install dnsmasq | |
echo 'address=/.3dev/127.0.0.1' | sudo tee -a /etc/dnsmasq.conf | |
echo 'listen-address=127.0.0.1' | sudo tee -a /etc/dnsmasq.conf | |
sudo service dnsmasq restart | |
# now imlazy.3dev will resolve to localhost | |
# install nginx + php7 |
This file contains 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 | |
### | |
# | |
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea | |
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com) | |
# | |
# Ubuntu 11.04 and 12.04 LTS based web server installation script | |
# Run this by executing the following from a fresh install of Ubuntu Server: | |
# |
This file contains 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
version: '3' | |
services: | |
postgres: | |
image: postgres | |
container_name: postgres | |
environment: | |
- POSTGRES_USER=my_app | |
- POSTGRES_PASSWORD=secret | |
- POSTGRES_DB=my_app | |
ports: |
This file contains 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
version: "3.1" | |
services: | |
mysql: | |
image: mysql:5.7 | |
container_name: cakemysql | |
working_dir: /application | |
volumes: | |
- .:/application | |
- ./tmp/data/mysql_db:/var/lib/mysql | |
environment: |
This file contains 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
test:mysql: | |
services: | |
- mysql:5.7 | |
script: | |
- mysql --version | |
- mysql -uroot -proot -h $MYSQL_PORT_3306_TCP_ADDR -e 'CREATE DATABASE test_myapp_template;'; | |
- composer install --verbose --prefer-dist --optimize-autoloader --no-progress --no-interaction | |
- ( [ -f vendor/bin/phpunit ] && echo "phpunit already installed";) || composer require phpunit/phpunit | |
- DATABASE_TEST_TEMPLATE_URL="mysql://root:root@$MYSQL_PORT_3306_TCP_ADDR/test_myapp_template" bin/cake db_test -i | |
- DATABASE_TEST_URL="mysql://root:root@$MYSQL_PORT_3306_TCP_ADDR/app_test" DATABASE_TEST_TEMPLATE_URL="mysql://root:root@$MYSQL_PORT_3306_TCP_ADDR/test_myapp_template" QUEUE_DEFAULT_URL='null:///?queue=default&timeout=1' vendor/bin/phpunit --verbose --colors=never |
This file contains 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 | |
## Upgrade to php7.1 and install required dependencies | |
# execute this script using | |
# source <(curl RAW_GIST_URL) | |
read -p "You are about to upgrade to PHP 7.1 OK? " -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo 'y' | sudo add-apt-repository ppa:ondrej/php && \ | |
sudo apt-get update && \ |
This file contains 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
in /etc/systemd/system/cakesocket.socket | |
[Unit] | |
Description=Cakesocket example | |
[Socket] | |
ListenStream=8088 | |
Accept=yes | |
[Install] |
This file contains 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
source <(curl https://gist.githubusercontent.com/steinkel/4eb1cb0b67ddb92f5d5b04646f470cd5/raw/25ae1fb294ee2ce98c728329ce19686b7990e5ae/cloud9%2520php7%2520cakephp%2520) |
This file contains 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
mysql -uroot -e "CREATE DATABASE my_app; CREATE DATABASE test_myapp" | |
mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* to my_app@localhost identified by 'secret'" | |
curl -L https://raw.githubusercontent.com/steinkel/cakefest2017/master/schema.sql |mysql -uroot my_app |
NewerOlder