Why is google cloud app deploy still giving me the old site - google-cloud-platform

Recently I update all my site to a new node.js version 13.
I work hard to fixed everything. (My old site was online on Google cloud over 1 year with a version 7 or 8 and was working).
So I create my dist folder, and I create a new bucket on Google cloud. I follow every step from this site:
https://medium.com/#hb.ui/deploy-angular-app-to-google-cloud-app-engine-bucket-storage-9a9852f29869
So my new site was working fine with the new look.
But I had some small mistakes in some pages, so I rebuild a new dist folder. I erase the dist folder in my bucket and upload the new one.
I redo these 2 steps (with my real site name):
gsutil rsync -r gs://fitness-dashboard-bucket ./fitness-dashboard-app
and
gcloud app deploy ./fitness-dashboard-app
Unfortunately, the deploy gives me the old site. I modify and update the YAML file like it says in this post:
gcloud app deploy trying to push old code
And the site was not working . (GREAT, so I know that the deploy is working). I resend my real yaml file and do the 2 commands. but the site still giving me the old site again.
Why my modification are not taken ? Does I need to versioning ? If so How I do this ?
How I can update my site ??
Thanks

Finally I found it by myself.
I Open Editor in google and I saw old directories from a previous deployment. Like if the dist folder was not the same.
So I erase all old stuff in my app directory.
I close the editor and return to the terminal.
I just sync again et redeploy and finally I got my new site.
(I use my 2 commands that I write in my question to sync and deploy).

Related

Trouble deploying django webapp onto google cloud

I've been following the google cloud documentation titled, "Running Django on the App Engine standard environment" . I'm using the same app provided in the documentation in the "Cloning the Django App". Honestly, I get lost in the google cloud documentation under the "Configuring Database Settings" section. This what my settings.py (mysite/settings.py in the given app mentioned previously)
Mysite/settings.py img
Whenever running python manage.py makemigrations - I get the following error message on the CLI...
django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable
Also, I have noticed there is no .env file in that repo. Would I maybe have to create it myself or would is it fine? Again I am using the github given app via the documentation.
Just trying to deploy Django website to google cloud. Any help would be greatly appreciated. Im on Mac Big Sur btw if that matters.
I tried to deploy the application using this documentation and got the same error you mentioned about. Then I observed that there is some issue with the github files mentioned in the documentation for which an open github issue is there. The reason for the issue is that the current code in the github repository matches a new tutorial version and we hope to get the new tutorial version updated soon to match the current code in the github repository.
For now using a specific previous version of ‘mysite/settings.py’ file in place of the current ‘mysite/settings.py’ file and adding ‘PyMySQL==1.0.2’ in requirements.txt file will work. The required previous version of the ‘mysite/settings.py’ can be found in this link. Follow the documentation for all remaining steps.

How could i deploy my Cloud Code to AWS Elastic Beanstalk? (Parse Server)

I am struggling about how to upload my Cloud Code files that i had on Parse.com to my Parse Server hosted on AWS EB.
So far i have:
Parse Server hosted on AWS EB. To host it on AWS i used the Orange Deploy Button which basically makes all stuff easier for people without having to install the Parse Server locally and upload it later to AWS.
iOS App written in objective C connected to the Parse server and working perfectly
Parse Dashboard locally on my mac connected to the Parse Server on AWS
The only thing that i would need is to upload all my cloud code files to the Parse Server. How could i do this? I have researched a lot over Google, stackoverflow, etc without success. There is some information but its unclear. Thanks in advance.
Finally and thanks to Ran Hassid i now have a Fully functional Parse Server on AWS with Cloud Code. For those who are in the same situation where i was, here is the answer to my question:
Go to this link here and follow all the steps (By the time i asked the question, the information provided by this link of AWS wasn't that clear as it is now. They improved the explanations and the info.)
After you finish all the previous steps from the link. You would have a Parse Server on AWS working.
Now the part of CLOUD CODE. Just create a folder in your MAC or PC wherever you like. Let's say on the desktop and called it Parse Server AWS (You can call it whatever you want)
Install the EB CLI which is the Command line interface to user Terminal (On Mac) or the equivalent on windows to work with the parse server you just set up on AWS (Similar to CloudCode with Parse CLI). The easy way to install it is running this command:
brew install awsebcli
Now open terminal on mac (or the equivalent on windows) and go to the folder that you just created on the step 3.
Run the next command. It will ask you to select the location of your parse server, and then the name.
eb init
Now this command. It will download all the files from AWS of your parse server to this folder you are in.
eb labs download
Finally, you will have a folder called Cloud where you can put all your cloud code files in.
When you finish just run the command:
eb deploy
Now you have your parse server with all your cloud code files working on AWS.
Now any change you need to make to your cloudCode files, just change the local files inside this folder just created on step 3 and run again the command from the step 9. Just exactly as you used to do with Parse Deploy command
Hopefully this information will help many people as it helped to me.
Have a happy coding!
parse-server cloud code is a bit different from Parse.com cloud code. In Parse.com we use the Parse CLI in order to modify and deploy our cloud code (parse deploy ...) in parse-server your cloud code exist under the following path of your parse project ./cloud/main.js* so your cloud code endpoint is the main.js file which by default located under the **cloud folder of your parse project. If you really want you can change this path but to keep it simple use the default location.
Now about deployment. in parse-server you need to redeploy your parse server again when you do some modification to your cloud code. Another option is to edit your cloud code remotely but from my POV its better to redeploy it

How to deploy ember-cli app to S3

I have an ember-cli app that is deployed in S3. It works well, and I have Travis set up to deploy changes when there is a merge into the master branch in GitHub.
But sometimes I want to test a change in the deployment environment without a commit -- perhaps because it can only be tested in that environment, like a fix to a mobile-only defect.
So I tried:
ember build --environment=production
followed by:
aws s3 cp dist/ s3://my_bucket/ --recursive
which uploaded things to my bucket. But the page didn't work, my browser told me there was a redirect loop. It wasn't a code issue, because when I pushed the changes to master, Travis successfully deployed them to S3.
Is there something clearly wrong with what I did, copying the dist folder to my bucket?
I'm using Ember-cli 1.3.1, if that matters.
I suggest you use ember-cli-deploy works pretty and support several plugin in order deliver your code much more easier.
I haven been using it for a while a work pretty well.
http://ember-cli.github.io/ember-cli-deploy/plugins/

Joomla Backup to run Locally

Can a downloaded backup of Joomla website be run on localhost? If yes, what changes I need to do locally?
I placed the unzipped backup folder under C:\xampp\htdocs\joomla. So now as I try to run loclhost //localhost/joomla it gives me following error.
Database Error: Unable to connect to the Database: Could not connect to MySQL.
Please note that I've not done any changes to backup. Just placed the unzipped backup downloaded via FTP in htdocs.
You will also need to download a copy of the website database and install this locally. If this is new to you, check out Akeeba Backup, it will simpplify your life when moving sites between different servers. It will bundle the database and site files into a nice, neat zipped package for you.
Chances are the database specifics are incorrect. Unless you have created the exact database name and user on localhost you'll need to edit configuration.php to straighten that out.

Django Deployment Advice

I have a multi-step deployment system setup, where I develop locally, have a staging app with a copy of the production db, and then the production app. I use SVN for version control.
When deploying my production app I have been just moving the urls.py and settings.py files up a directory, deleting my django app directory with rm -rf command and then doing an svn export from the repository which creates a new django app directory with my updated code. I then move my urls.py and settings.py files back into place and everything works great.
My new problem is that I am now storing user uploads in a folder inside of my django app, so I can't just remove the whole app dir anymore or I would loose all of my users files.
What do you think my best approach is now? Would svn export --force work, since it should just be overwriting all of my changed files? Should I take an entirely new approach? I am open to advice?
You may want to watch this presentation by Jacob. It can help you improve your deployment process.
I use Bitbucket as my repo and I can simply perform push on my Dev box and run pull/update on Stage/Prod box. Actually I don't run them manually, I use fabric to do them for me :).
Your could use rsync or something similar to backup your uploaded files and use this backup when you deploy your project.
For deployment you could try to use buildout:
http://www.buildout.org/
http://pypi.python.org/pypi/djangorecipe
http://jacobian.org/writing/django-apps-with-buildout/
For other deployment methods see this question:
Django deployment tools
You can move your files to S3 servers (http://aws.amazon.com/s3/), so you will not ever have to care about moving them with your project.