This is really only good for a dev environment - you would at the very least need to attach a volume to prevent data loss in the event you lose the container, and add a non-root user.Īfter the DB is up and running, flask_sqlalchemy makes connecting to a DB pretty easy. You can always connect to that instance and add more databases. Running that one command will download the mysql base image, start it up with root set to whatever password you chose, and will create a base DB (MYSQL_DATABASE). Not suitable for production, but an easy way to spin up a dev server.ĭocker run -name mysql_container_name -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=your_db_name -p 3306:3306 -d mysql:5.7 Then, you'll connect to the DB with pymysql or sql-alchemy using localhost:3306 and root/whichever root password you just chose. To jump on the docker train, you can spin up a mysql server with a single docker run command. OpenShift (requires extensive ssh installation of ruby, python, etc.).Google App Engine (Desktop admin app flask can be configured with this repo).WebFaction (SSH paid-web-host flask must be installed by you possible configuration and path issues possible SFTP).Heroku (SSH flask must be installed by you, slightly-difficult-windows-instructions, upgradeable cloud service).(web-SSH web-instant-MySQL-db web-IDE instant deployment of flask, free easy logs github/single-file-upload support SFTP/SSH requires pay).Official Flask website and documentation. Use if you are discussing a certain extension to Flask.Īlso check out /r/python or /r/django Websites built with Flask Use or if you have a very specific problem and need help with code. Use Python and Flask to build the web faster
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |