Permalink
Browse files

Refector to use opsfile

  • Loading branch information...
eva-thientran committed Dec 7, 2017
1 parent 92b09e4 commit 7854bb4b7bf62e86175e8d536aaeb3efc380efb6
View
@@ -6,3 +6,4 @@ sftp-config.json
/Dockerfile
.env
debug.log
/opsfiles
View
@@ -62,8 +62,8 @@ install:
before_script:
- echo 'CREATE DATABASE phanbook CHARSET=utf8 COLLATE=utf8_unicode_ci' | mysql -u root
- cat schema/phanbook.sql | mysql -uroot phanbook
- cat schema/examples.sql | mysql -uroot phanbook
- cat schema/V1.0.0__Phanbook.sql | mysql -uroot phanbook
- cat schema/V1.0.1__AddExamples.sql | mysql -uroot phanbook
- cp ./tests/.env.travis .env
- php -S 127.0.0.1:8000 -t public/ .htrouter.php >/dev/null 2>&1 &
- ulimit -c unlimited -S || true
View
55 run.sh
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
if [ ! -d "opsfile" ]; then
git clone --depth=1 https://github.com/phanbook/opsfiles.git
fi
chmod 777 -R public/
chmod 777 -R cache/
chmod 777 -R content/logs
# Now use docker setup for default
if ! which docker > /dev/null; then
echo "Docker doesn't seem to be installed. Please download and install it"
echo "from https://docs.docker.com/engine/installation/ and re-run phanbook."
exit 3
fi
if [[ "destroy" == "$1" ]]; then
# Stop and remove any existing containers
docker rm -f $(docker ps -a -q)
# Delete all images
docker rmi -f $(docker images -q)
fi
if ! which docker-compose > /dev/null; then
curl -L https://github.com/docker/compose/releases/download/1.3.3/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
sudo service docker start
fi
cd opsfiles/docker
docker-compose config
docker-compose build
docker-compose up -d
if [ 'rebuild' == "$1" ]; then
cd opsfiles/docker
docker-compose down -v
docker-compose up -d
fi
if [ 'composer' == "$1" ]; then
cd opsfiles/docker
docker-compose up composer
fi
if [ 'migrate' == "$1" ]; then
cd opsfiles/docker
docker-compose up migrate
fi
# Fix PSR2
if [ 'psr2' == "$1" ]; then
vendor/bin/phpcbf --standard=PSR2 $2
fi
File renamed without changes.
@@ -1,5 +1,3 @@
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phanbook` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `phanbook`;
INSERT INTO `activities` VALUES (1,23,'U',NULL,NULL),(2,24,'U',NULL,1431165028),(3,25,'U',NULL,1431166358),(4,26,'U',NULL,1431167883),(5,27,'U',NULL,1431168990),(6,28,'U',NULL,1431190884),(7,29,'U',NULL,1431191240),(8,30,'U',NULL,1431192016),(9,31,'U',NULL,1431192194),(10,32,'U',NULL,1431193106),(11,33,'U',NULL,1431193773),(12,34,'U',NULL,1431193879),(13,35,'U',NULL,1431193945),(14,36,'U',NULL,1431193959),(15,37,'U',NULL,1431194000),(16,38,'U',NULL,1431194066),(17,39,'U',NULL,1431194125),(18,40,'U',NULL,1431194851),(19,41,'U',NULL,1431195134),(20,42,'U',NULL,1431195330),(21,43,'U',NULL,1431308713),(22,44,'U',NULL,1431308972),(23,45,'U',NULL,1431309032),(24,46,'U',NULL,1431698227),(25,47,'U',NULL,1431843555),(26,48,'U',NULL,1432956258),(27,49,'U',NULL,1433501295),(28,50,'U',NULL,1433522311),(29,51,'U',NULL,1433522781),(30,52,'U',NULL,1433522864),(31,53,'U',NULL,1433522956),(32,54,'U',NULL,1433537418),(33,55,'U',NULL,1433596909),(34,56,'U',NULL,1433663836),(35,57,'U',NULL,1434202351),(36,58,'U',NULL,1434421892),(37,59,'U',NULL,1434551252),(38,60,'U',NULL,1435210795),(39,61,'U',NULL,1435210956),(40,62,'U',NULL,1435398269),(41,63,'U',NULL,1435556491),(42,64,'U',NULL,1435557180),(43,65,'U',NULL,1435557801),(44,66,'U',NULL,1435558508),(45,67,'U',NULL,1435559933),(46,68,'U',NULL,1435563012),(47,69,'U',NULL,1435563557),(48,70,'U',NULL,1435563783),(49,71,'U',NULL,1435563802),(50,72,'U',NULL,1435563922),(51,73,'U',NULL,1435565836),(52,74,'U',NULL,1435678770),(53,75,'U',NULL,1435678971),(54,76,'U',NULL,1435679912),(55,77,'U',NULL,1435888853),(56,78,'U',NULL,1436190190),(57,79,'U',NULL,1436934805),(58,80,'U',NULL,1437273168),(59,78,'C',71,1438181036),(60,78,'C',71,1438181079),(61,78,'C',71,1438181096),(62,78,'C',71,1438181141),(63,78,'C',71,1438181272),(64,78,'C',71,1438181322),(65,78,'C',71,1438181455),(66,78,'C',71,1438181529),(67,78,'C',71,1438181553),(68,78,'C',71,1438181951),(69,78,'C',71,1438181978),(70,78,'C',71,1438182044),(71,78,'C',71,1438182059),(72,78,'C',71,1438182159),(73,78,'C',68,1438182505),(74,78,'C',68,1438182533),(75,78,'C',68,1438182549),(76,78,'C',68,1438182607),(77,78,'C',68,1438182668),(78,78,'C',68,1438183460),(79,78,'C',68,1438183551),(80,78,'C',68,1438183626),(81,78,'C',68,1438183741),(82,78,'C',68,1438183793),(83,78,'C',68,1438183851),(84,78,'C',68,1438183924),(85,78,'C',68,1438184385),(86,78,'C',68,1438184415),(87,78,'C',68,1438184443),(88,78,'C',68,1438184483),(89,78,'C',68,1438184755),(90,78,'C',68,1438184759),(91,78,'C',68,1438184783),(92,78,'C',68,1438185511),(93,78,'C',68,1438185514),(94,78,'C',70,1438185859),(95,78,'C',70,1438185891),(96,78,'C',70,1438186051),(97,59,'C',71,1438223343),(98,59,'C',68,1438224055),(99,59,'P',NULL,1438225705),(100,59,'P',73,1438225781),(101,59,'P',74,1438225810),(102,59,'P',75,1438226079),(103,59,'P',76,1438226275),(104,59,'P',77,1438226363),(105,59,'R',76,1438265705),(106,59,'R',77,1438316965),(107,59,'R',77,1438317345),(108,59,'R',49,1438317457),(109,59,'R',49,1438317570),(110,59,'R',49,1438317704),(111,59,'R',49,1438317870),(112,59,'R',49,1438318088),(113,59,'R',49,1438318136),(114,78,'P',78,1438327237),(115,78,'P',79,1438327342),(116,78,'P',80,1438327369),(117,78,'P',81,1438333233),(118,59,'R',80,1438334858),(119,59,'R',66,1438497292),(120,59,'R',77,1439174298),(121,59,'R',77,1439174540),(122,59,'R',81,1439175090),(123,81,'U',NULL,1440903618),(124,82,'U',NULL,1442554710),(125,2,'R',66,1442984720),(126,2,'P',82,1442994492),(127,83,'U',NULL,1443078493),(128,84,'U',NULL,1445586437),(129,89,'U',NULL,1478547286),(130,112,'U',NULL,1478558096),(131,113,'U',NULL,1478558268),(132,114,'U',NULL,1478558366),(133,115,'U',NULL,1478559222),(134,116,'U',NULL,1478559673),(135,117,'U',NULL,1478560101),(136,118,'U',NULL,1478560117),(137,119,'U',NULL,1478560182),(138,120,'U',NULL,1478560216),(139,121,'U',NULL,1478560257),(140,122,'U',NULL,1478560296),(141,123,'U',NULL,1478560422),(142,124,'U',NULL,1478560535),(143,125,'U',NULL,1478560559),(144,126,'U',NULL,1478560581),(145,127,'U',NULL,1478560626),(146,128,'U',NULL,1478560694),(147,129,'U',NULL,1478560745),(148,130,'U',NULL,1478560762),(149,131,'U',NULL,1478560843),(150,132,'U',NULL,1478588207),(151,133,'U',NULL,1478588276),(152,134,'U',NULL,1478627920),(153,135,'U',NULL,1478629818),(154,136,'U',NULL,1478760125),(155,137,'U',NULL,1478760260),(156,138,'U',NULL,1478760285),(157,139,'U',NULL,1478760327),(158,140,'U',NULL,1478760382),(159,141,'U',NULL,1478760693),(160,142,'U',NULL,1478760816),(161,143,'U',NULL,1478760890),(162,144,'U',NULL,1478760901),(163,145,'U',NULL,1478760915),(164,146,'U',NULL,1478760932),(165,147,'U',NULL,1478760972),(166,148,'U',NULL,1478760979),(167,149,'U',NULL,1478761038),(168,150,'U',NULL,1478761142),(169,151,'U',NULL,1478761392),(170,152,'U',NULL,1478761409),(171,153,'U',NULL,1478761463),(172,154,'U',NULL,1478761476);

0 comments on commit 7854bb4

Please sign in to comment.