Laravel upload to Pagodabox - mysql

I'm new to pagodabox.
I have connected my github project to pagodabox. I'm using Laravel 4 and I already created a database.
However, how can I upload my local database to pagodabox so my project can use it?
Here's my project http://dreary-doria.gopagoda.com/
Last is, what files I need to configure in my laravel project so that I can use it? As you can see when you check the link, it's just going to the root and not rendering the public directory.

Related

I need a foolproof checklist for hosting an already built e-commerce site on Amazon Web Services

I have built an e-commerce website on my local computer that uses Django version 2.2 and python 3.7.
The website consists of:
fancyfetish is the main project directory.
The apps, (cart, users, baseapp, products, blog) are all stored in their own directory 'apps.
Within the settings folder I have three settings files:
- production.py
- base.py
- development.py
The static file in the main directory is where I put collectstatic files.
Media is where I store externally uploaded images (product images for example)
Docs is just random bits like a hand drawn site layout.
Static files like JS and CSS are stored within baseapp, within apps.
I want to host this website on Amazon Web Services, and I assume I need to use Elastic Beanstalk. I went through the process of trying to host with free version of EB, installed the EB CLI, and after using eb create and eb deploy on the CLI my website appeared.
However, the static files didn't load properly in the first instance because I had not properly configured DJANGO_SETTINGS_MODULE. I have now done this. But before deploying I added eb migrate functionality so that I could also migrate my database.
This seems to have messed everything up. I can no longer deploy because there is a DATABASE error, which I expected. The error said 'Not able to connect to MySQL database through 'localhost'. Well, of course it cant.
So, in order to deploy my site on AWS I needed to configure the databases, because with the eb migrate functionality it will no longer deploy without trying to also connect to my database using the settings I have configured.
I have so far, whilst in development mode, connected my project to MySQL and everything is running perfectly on localhost, with my models transferring beautifully to the database just as I would like.
I worked out that I need to create a database on AWS, obviously. So I set up an RDS. I didn't link it to my deployed application because it would appear that the application doesn't have an environment that I can see when I log into my console. So where my project has been deploying to I don't know, because it doesn't look like the CLI version is connected to the online version in my console.
So I thought I'd deal with that problem later and work out how to make a database, which I managed to do. However, migrating the database I already have up and running on MySQL to my RDS database seems impossible, and there are not very good instructions. Let alone trying to then connect said database to my deployed application, which doesn't seem to sync with my local app.
So, I have ended up deleting everything because I was becoming so confused, with so many new directories (.ebextensions etc etc) and a database that wont connect, a project that won't deploy, a database that wont point to my project etc. I ended up created an EC2 folder and all sorts, getting myself massively confused with what I actually need to do to make this whole thing work.
If any part of this ramble makes any sense to anyone out there, and you yourself have managed to deploy a larger django project to AWS and keep your existing databases then please do let me know. But I have a feeling this may be a long shot.
Basically I need a step by step list of what to do to deploy:
For example:
1) Create an elastic beanstalk instance
2) Create an environment on CLI that syncs to the one in my AWS console
etc
etc
(With how to's if you possibly have the time!)
Thank you, and I am so sorry for being so confused by something that may be simple
Edited to show my process:
I have built a directory called .ebextensions with a file within it called django.config with the following content:
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: fancyfetish/wsgi.py
I have run the following command:
eb init -p python-3.6 fancyfetish
There was no output as a result of this in the terminal, however a directory was created called .elasticbeanstalk with one file in it called config.yml
I then typed eb init to create an SSH key pair and there was no output from this command at all:
As you can see I have tried doing this several times.
Instead I created a key pair manually within AWS console and a file automatically to my computer called keyname.pem
I then typed into the console
chmon 400 path/to/key/keyname.pem
This provided no output on the terminal so I cannot know if it worked.
I moved the downloaded SSH file into the .SSH directory in the Home directory of my computer, and then in the terminal typed:
eb init -k nameofkey
The output was:
WARNING: Uploaded SSH public key for "fancyfet" into EC2 for region us-
west-2.
I then went on to type
eb create fancyfet-env
And an environment was created with the following output:
I know that this has to do with databases and connecting to MySQL.
I then typed:
eb deploy
With the following output:
So now comes the bit where I get stuck, successfully creating a database that connects to my already existing database that is populated with database in MySQL, and connecting the project to the database.
HELP!(Thank you so much!)

Using dbms_scheduler.create_credential on a exedata

I want to setup a file_watcher for file created in a location in the OS. We are currently using Jobs that access the files through utl_file.fopen to access the files using a directory entry.
I ask my DBA to setup a credential so I can establish the file watch using dbsm_scheduler. He told me that because we are using a exadata appliance for our database we could not create the credential. I dont get it! If we are accessing the file through a directory why is a issue access through a credential?
Any Ideas?

Is there a quick way to import my external css files so that I can convert my dynamic webpage into a static one?

I have a wordpress site and I want to be able to make one of the pages 'standalone' html so that I can display it in a browser that's not connected to the internet. Any ideas?
To get a local copy of your actual page view user Ctrl+s. This will not include all css/js and might be not what you want. Its a better screenshot.
To get a fully working local version install xampp to get a webserver and a mysql server.
https://www.apachefriends.org/
Download you WordPress instance and move it in the htdocs directory that is inside the xampp installation.
Create a mysqldump of your wordpress database and load it into your local mysqlserver.
Configure your local WordPress instance so it can connect to the database.

Move a WordPress Site to Openshift

I have a working WordPress website hosted at Hostgator which I want to move to Openshift. Till now I have done :
Downloaded the entire WP installation(including wp-includes, wp-admin,wp-content etc.)
Downloaded the original MySql database with phpmyadmin(both zipped and .sql format)
Installed fresh WP on Openshift, later I logged in into the database of this new installation and dropped all the tables(with phpmyadmin).
Thereafter uploaded the original database, successfully imported into the new Openshift database(with phpmyadmin).
Then I upload all original downloaded WordPress installation files into the Openshift one, overwriting everything.
Now I see a database connection error. I guess Openshift doesn't recognize wp-config.php details which consists of the Hostgator data(which I am confused as I don't know if I should be editing the one in the GIT folder or the one in the app-root/current).
Request a step-by-step process. Help appreciated.
My suggestion would be to use the Openshift Wordpress quickstart, and get a Wordpress application deployed and then just restore the DB.

Failing to Move / Migrate a Liferay Portal to other Server

Is there an up-to-date, complete guide on moving a Liferay Portal ?
How am I supposed to migrate a Portal to another Server in an efficient and safe way ?
I've been developing a Portal, connecting to a mySQL database. Then, I had to move both the portal and database to another Server.
So I did the following steps, pretty identical to this guide
export the mySQL Db and import it in the new Server. The data are moved correctly, as I've checked them manually
Copy a new (clean) copy of the Liferay Portal to the new server
copy the data folder
copy portal-ext.properties, then edit the db url and login credentials
Copy the portal-setup-wizard.properties, then change the 'liferay.home' param to the correct portal path
I run the server and my admin has the default 'test' password instead of the one I used before the migration
then I see that Can't have access to the previous content, like Users, UserGroups, Pages, etc. I Also tried re-indexing the database entries (Users and Organizations, Web Content etc). Again nothing
I also Tried copying the whole Portal, and only changing the .properties files to target the new database and portal path. Again the same problems, no Content from the old portal. It's like I started a fresh portal
So what did I do wrong this time ?
Used Liferay 6.1.0 ce ga1
I failed migrating the portal and had to create it from scratch. Almost 1 year later, i found out what caused the problem. Here it is. To be fair, it's a MySQL issue, not Liferay
The MySql database, since it got ported from a windows server to a Linux one, was exported with table names in Uppercase. When Liferay tries to connect to the database, it will not find the Liferay Model's tables, and will create new ones. Practically Liferay treats the Database as an empty one, and it starts as a fresh portal. I only found that, while exploring the database sometime later, and found out I had each Liferay Table both in uppercase and lowercase.
More info and solutions can be found here