I use py-staticmaps repository for generate static map image, In normally I run this repo via python .main.py, it is working but I use the repo in Django and docker, I have a problem with cache files,. following error. What can I do?
I build it locally al of them working normally but in server I run via docker-compose that is to be problem with cache
Related
I would like to deploy an Django App on to Microsoft Azure through the App Service.
In the requirements.txt I have a package that I wrote myself and need to install from local directory which is in the same directory as manage.py.
I have tried to deploy the app through local git, and everytime it is running into the error it is not able to import the local package although it is able to install it with no problem in "antenv" (the virtual env Azure creates automatically)
NEWEST
In azure webapp, it not support venv.
Suggestion:
You can copy and paste local package to site-packages folder to test, if not works, you should use docker container to test. But also need to add local package manually.
PRIVIOUS
I test it and it works fine.
I will share my test steps for you.
Step 1. Run successfully in local.
Step 2. Push project to https://yoursite.scm.azurewebsites.net/yourproject.git
You can follow the offical doc(Local Git deployment to Azure App Service).
Step 3. Visit your website.
You can download my sample code in github. You also need to add pyodbc then you can get same result with me. For more details, pls check this post(How to access ODBC Driver on Azure App service).
I have a django web application code in github. From time to time, I make necessary updates and arrangements on the repository. I have to pull the project every time and make adjustments on the docker and run on my machine.
Is there a way to run docker synchronously with the code in my github repoitory? When I make a change in github I want the docker to pull it automatically and try to run the project without interrupting.
Using hooks inside Jenkins we configure Git & Docker.
Say:
When ever we push changes to git, then jenkins job will trigger, jenkins will pull the changes and build new docker image and push the image inside docker.
I'm attempting to deploy a Django app via docker, first locally, and then to a cloud server. I could not find an answer to my initial question before I attempt this: if I run docker-machine create, I'm guessing this should be run from within my virtualenv, right?
This would then grab all of my specific app dependencies, and begin to build certificates to throw in the container? If not, please explain otherwise..
Yes you are correct.
I will try to help you by my experience, if you wanna deploy django apps via docker.
First you need to setup docker machine in your local machine. Please see the
instruction. By default driver that will be used is --driver
virtualbox default.
List what kind of specifics dependencies images of your apps. Ex:
you need nginx, postgres, uwsgi, or you need to fetch an image then
modified that image you can use dockerfile (its the best practice
for you).
I suggested you to use docker-compose. Really its make our project
pretty easy to manage. You have to define all images that you need
for your app in docker-compose file Please read this reference.
After you finished develop your app then you want to deploy in production server (cloud) you just need to copy all your project then running your docker-compose. All images dependencies will be automatically pulled in the cloud.
As a reference, you can see this project (this is an open source project that I developed.) On that project, I use make file to manage docker-compose command and it make easy to manage.
An example of dockerfile
An example of docker-compose.yml
An example of Makefile
Hope this will help you.
I am planning on moving from "EmberJS" to the Ember-cli, though I have a small problem. Is it possible only to run file watcher instead of serving/using ember serve that will run local server? As I am running my PHP backend on the Google App Script I have already a local python HTTP server running in localhost:8080 I do not need another one to run in localhost:4200
If I don't run ember serve my local changes in development environment wont get updated. Is there a better way of doing this? Is it possible to use assets in the app folder when running in development environment? and use dist folder for staging/live environments?
As mentioned in the guide, you can use the build command with the --watch flag.
ember build --watch
That will keep rebuilding your changes but not actually run the server.
As for your second question:
Is it possible to use assets in the app folder when running in development environment? and use dist folder for staging/live environments?
I don't believe so. You can change the output-path property in your .ember-cli config file, but you can't have one that's specific to a certain environment. You could always write a quick script to move the files though. :)
I was wondering if it is possible to deploy to heroku with out putting my django project on git?
My another question. I already have my app on heroku. Now I want to make changes to it. But the computer I had the soruce code crashed. So how do I download my project files from heroku?
No. ( But there is a plugin to do that, but I would say why bother. But.. - https://github.com/ddollar/heroku-push)
But all you have to do is git init to setup a repo, and push to the heroku remote after setting up an app. You don't have to publish your repo anywhere.
You can get back your code by using:
heroku clone <appname>