Last active
July 8, 2020 17:30
-
-
Save miguelbalparda/3ef22403edd6410eeba33d7a6eac9d80 to your computer and use it in GitHub Desktop.
Carpoolear local dev env
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
git clone https://github.com/STS-Rosario/carpoolear_backend.git | |
Create vhost www.carpoolear-dev.com.ar pointing to carpoolear_backend/public | |
Add AllowOverride All between </Directory> inside the created vhost | |
Point www.carpoolear-dev.com.ar to 127.0.0.1 in hosts file. | |
composer install | |
cp .env.example .env | |
Change DB credentials | |
Change MAIL_DRIVER=smtp to MAIL_DRIVER=log for local development | |
chmod -R ugo+rw storage/ | |
php artisan key:generate | |
php artisan migrate | |
git clone https://github.com/STS-Rosario/carpoolear.git | |
npm install | |
Edit dev.env.js and prod.env.js and change the api endpoint to the local domain. | |
cd cordova && cordova platform add android | |
cordova build browser --release | |
Symlink resulting dir (carpoolear/cordova/platforms/browser/www/) to carpoolear_backend/app |
Creating users was not working. The error was a timeout while trying to connect to mailtrap.io. Changing the driver to log allowed me to see the emails inside carpoolear_backend/storage/logs/ i.e to activate the account.
michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ php -v
PHP 7.1.17-0ubuntu0.17.10.1 (cli) (built: May 9 2018 17:28:01) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.17-0ubuntu0.17.10.1, Copyright (c) 1999-2018, by Zend Technologies
michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ php -m
[PHP Modules]
calendar
Core
ctype
date
dom
exif
fileinfo
filter
ftp
gettext
hash
iconv
imagick
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ mysql -V
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper
michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ apache2 -v
Server version: Apache/2.4.27 (Ubuntu)
Server built: 2018-04-18T14:20:05
when i put the directory to /var/www/carpoolear_backend/public the website and API works not the app and when i point it to /var/www/carpoolear_backend/app the /app work but the normal API and web app don't work any suggestions?
I think you are missing a step, probably this one.
Do you have any pointers when enabling https for the app. I am getting /api/trips 404 when accessing over https. I have a self signed certificate configured and the app is running on apache2 in ubuntu 18 env.
EDIT- http works without any issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Response for /api/users was 404. Adding AllowOverride All and enabling mod_rewrite fixed this.