GithubHelp home page GithubHelp logo

tiangolo / full-stack Goto Github PK

View Code? Open in Web Editor NEW
523.0 24.0 81.0 540 KB

Full stack, modern web application generator. Using Flask, PostgreSQL DB, Docker, Swagger, automatic HTTPS and more.

License: MIT License

Shell 6.74% Python 59.53% Mako 0.78% TypeScript 14.38% JavaScript 0.80% HTML 1.53% Dockerfile 3.92% Vue 12.31%
python flask docker traefik letsencrypt swagger celery sqlalchemy api jwt

full-stack's Introduction

๐Ÿšจ DEPRECATION WARNING ๐Ÿšจ

As FastAPI and the equivalent project generator provide a much better solution to all the use cases this project was built for, all the future development will be done there.

You are still free to use this project, but it won't receive any new features, changes, or bug fixes.

If you are starting a new project from scratch, check the alternatives at the FastAPI docs: Project Generation.

Full Stack Flask and PostgreSQL - Base Project Generator

Build Status

Generate a backend and frontend stack using Python, including interactive API documentation.

Screenshot

Notice: Flask or FastAPI

If you are using this project (or Flask in general to create web APIs) you would probably benefit more from FastAPI.

You can use the equivalent sibling project generator based on FastAPI: https://github.com/tiangolo/full-stack-fastapi-postgresql. It also has more features than this one.

FastAPI was created from the learnings acquired while creating and using these project generators for Flask, with all the plug-ins and ideas.

  • FastAPI (and its project generators), would give you about 800% (8x) the performance achievable with this one.
  • Writing code in FastAPI is about 200% to 300% faster. Because you write a lot less code, it is designed for web APIs, and you have auto-complete everywhere.
  • About 40% of the human (developer) induced errors can be reduced (FastAPI does a lot of the data validation, conversion and documentation for you).

Features

  • Full Docker integration (Docker based)
  • Docker Swarm Mode deployment
  • Docker Compose integration and optimization for local development
  • Production ready Python web server using Nginx and uWSGI
  • Python Flask backend with:
    • Flask-apispec: Swagger live documentation generation
    • Marshmallow: model and data serialization (convert model objects to JSON)
    • Webargs: parse, validate and document inputs to the endpoint / route
    • Secure password hashing by default
    • JWT token authentication
    • SQLAlchemy models (independent of Flask extensions, so they can be used with Celery workers directly)
    • Basic starting models for users and groups (modify and remove as you need)
    • Alembic migrations
    • CORS (Cross Origin Resource Sharing)
  • Celery worker that can import and use models and code from the rest of the backend selectively (you don't have to install the complete app in each worker)
  • REST backend tests based on Pytest, integrated with Docker, so you can test the full API interaction, independent on the database. As it runs in Docker, it can build a new data store from scratch each time (so you can use ElasticSearch, MongoDB, CouchDB, or whatever you want, and just test that the API works)
  • Easy Python integration with Jupyter Kernels for remote or in-Docker development with extensions like Atom Hydrogen or Visual Studio Code Jupyter
  • Vue frontend:
    • Generated with Vue CLI
    • JWT Authentication handling
    • Login view
    • After login, main dashboard view
    • Vuex
    • Vue-router
    • Vuetify for beautiful material design components
    • TypeScript
    • Docker server based on Nginx (configured to play nicely with Vue-router)
    • Docker multi-stage building, so you don't need to save or commit compiled code
    • Frontend tests ran at build time (can be disabled too)
    • Made as modular as possible, so it works out of the box, but you can re-generate with Vue CLI or create it as you need, and re-use what you want
  • PGAdmin for PostgreSQL database, you can modify it to use PHPMyAdmin and MySQL easily
  • Swagger-UI for live interactive documentation
  • Flower for Celery jobs monitoring
  • Load balancing between frontend and backend with Traefik, so you can have both under the same domain, separated by path, but served by different containers
  • Traefik integration, including Let's Encrypt HTTPS certificates automatic generation
  • GitLab CI (continuous integration), including frontend and backend testing

How to use it

Go to the directoy where you want to create your project and run:

pip install cookiecutter
cookiecutter https://github.com/tiangolo/full-stack

Generate passwords

You will be asked to provide passwords and secret keys for several components. Open another terminal and run:

openssl rand -hex 32
# Outputs something like: 99d3b1f01aa639e4a76f4fc281fc834747a543720ba4c8a8648ba755aef9be7f

Copy the contents and use that as password / secret key. And run that again to generate another secure key.

Input variables

The generator (cookiecutter) will ask you for some data, you might want to have at hand before generating the project.

The input variables, with their default values (some auto generated) are:

  • project_name: The name of the project

  • project_slug: The development friendly name of the project. By default, based on the project name

  • domain_main: The domain in where to deploy the project for production (from the branch production), used by the load balancer, backend, etc. By default, based on the project slug.

  • domain_staging: The domain in where to deploy while staging (before production) (from the branch master). By default, based on the main domain.

  • docker_swarm_stack_name_main: The name of the stack while deploying to Docker in Swarm mode for production. By default, based on the domain.

  • docker_swarm_stack_name_staging: The name of the stack while deploying to Docker in Swarm mode for staging. By default, based on the domain.

  • secret_key: Backend server secret key. Use the method above to generate it.

  • first_superuser: The first superuser generated, with it you will be able to create more users, etc. By default, based on the domain.

  • first_superuser_password: First superuser password. Use the method above to generate it.

  • backend_cors_origins: Origins (domains, more or less) that are enabled for CORS (Cross Origin Resource Sharing). This allows a frontend in one domain (e.g. https://dashboard.example.com) to communicate with this backend, that could be living in another domain (e.g. https://api.example.com). It can also be used to allow your local frontend (with a custom hosts domain mapping, as described in the project's README.md) that could be living in http://dev.example.com:8080 to cummunicate with the backend at https://stag.example.com. Notice the http vs https and the dev. prefix for local development vs the "staging" stag. prefix. By default, it includes origins for production, staging and development, with ports commonly used during local development by several popular frontend frameworks (Vue with :8080, React, Angular).

  • postgres_password: Postgres database password. Use the method above to generate it. (You could easily modify it to use MySQL, MariaDB, etc).

  • pgadmin_default_user: PGAdmin default user, to log-in to the PGAdmin interface.

  • pgadmin_default_user_password: PGAdmin default user password. Generate it with the method above.

  • traefik_constraint_tag: The tag to be used by the internal Traefik load balancer (for example, to divide requests between backend and frontend) for production. Used to separate this stack from any other stack you might have. This should identify each stack in each environment (production, staging, etc).

  • traefik_constraint_tag_staging: The Traefik tag to be used while on staging.

  • traefik_public_network: This assumes you have another separate publicly facing Traefik at the server / cluster level. This is the network that main Traefik lives in.

  • traefik_public_constraint_tag: The tag that should be used by stack services that should communicate with the public.

  • flower_auth: Basic HTTP authentication for flower, in the formuser:password. By default: "root:changethis".

  • sentry_dsn: Key URL (DSN) of Sentry, for live error reporting. If you are not using it yet, you should, is open source. E.g.: https://1234abcd:[email protected]/30.

  • docker_image_prefix: Prefix to use for Docker image names. If you are using GitLab Docker registry it would be based on your code repository. E.g.: git.example.com/development-team/my-awesome-project/.

  • docker_image_backend: Docker image name for the backend. By default, it will be based on your Docker image prefix, e.g.: git.example.com/development-team/my-awesome-project/backend. And depending on your environment, a different tag will be appended ( prod, stag, branch ). So, the final image names used will be like: git.example.com/development-team/my-awesome-project/backend:prod.

  • docker_image_celeryworker: Docker image for the celery worker. By default, based on your Docker image prefix.

  • docker_image_frontend: Docker image for the frontend. By default, based on your Docker image prefix.

How to deploy

This stack can be adjusted and used with several deployment options that are compatible with Docker Compose, but it is designed to be used in a cluster controlled with pure Docker in Swarm Mode with a Traefik main load balancer proxy handling automatic HTTPS certificates, using the ideas from DockerSwarm.rocks.

Please refer to DockerSwarm.rocks to see how to deploy such a cluster in 20 minutes.

More details

After using this generator, your new project (the directory created) will contain an extensive README.md with instructions for development, deployment, etc. You can pre-read the project README.md template here too.

History

Note about Angular: a previous version of this project generated a basic default Angular frontend application, but without any view or interaction with the rest of the stack (the backend API). I recently switched to Vue for frontend and used it to created the basic frontend views for this project (that didn't exist before). If you are interested in keeping the Angular version, let me know in an issue, I can create an Angular version of the project (without the current default views), then you can integrate your Angular app with the basic Dockerfile and additional files.

This project was based on senseta-os/senseta-base-project.

As I was the only maintainer, I'm continuing the development in this fork (https://github.com/tiangolo/full-stack).

License

This project is licensed under the terms of the MIT license.

full-stack's People

Contributors

abnerjacobsen avatar mariacamilagl avatar mcelisr1 avatar nicobytes avatar ohld avatar tiangolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

full-stack's Issues

Compose file invalid when running `docker-compose up -d`

The README says to run docker-compose up -d, but the default combination of Compose files is lacking a few images:

  • proxy
  • swagger-ui
  • pgadmin
  • flower

They are found in docker-compose.admin.yml, but not sure if that's what's intended to be run locally.

How to add Websockets

Hi Sebastian, thank you for all your work on full-stack! Curious if you have any pointers around adding flask-socketio to add websockets alongside the API on the backend?
Hit numerous issues in trying this myself, particularly as i don't think it will work in dev with the werkzerg server (tried adding --no-reload and no debug as socketio has to run in the main thread. And i'm trying to stack deploy to staging to observe if it's just a case of not being able to run in dev but would work in other environments. Any guidance you could offer would be greatly appreciated as I'm looking to blend my Vue.js app to work both with the backend API but also leverage websockets instead of aweful chatty API polling. THANKS!

Error after running docker-compose up -d

I would like to get a Cluster setup with Docker Swarm Mode and Traefik, do you have more detailed docs for that? (I've just started teaching myself the cmd-line and python in the last 30 days so its hard to understand.)

How to troubleshoot a service when it fails to run [workflow for docker swarm deploy]

Hi!

I'm trying to deploy a cluster using these instructions .
https://github.com/tiangolo/full-stack/blob/master/docker-swarm-cluster-deploy.md

It seem like the DB is not coming online and causing the backend to also fail after many attempts from tenacity.

$ docker service logs db tells me "no such task or service: db", but I can see it is listed with
$ docker service ls, with replicas 0/1

I don't have previous experience with swarm, is there a way to access failed service logs?
I tried following advice like print journalctl, but that doesnt seem very useful in this case. Should I include something extra to output logs?

backend app won't start

Following the instructions in the generated readme, when I docker-compose up -d, the backend fails to start with this error:

backend_1        | Traceback (most recent call last):
backend_1        |   File "./app/main.py", line 8, in <module>
backend_1        |     from .core import app_setup  # noqa
backend_1        |   File "./app/core/app_setup.py", line 18, in <module>
backend_1        |     from ..api.api_v1 import api as api_v1  # noqa
backend_1        |   File "./app/api/api_v1/api.py", line 8, in <module>
backend_1        |     from .api_docs import docs
backend_1        |   File "./app/api/api_v1/api_docs.py", line 3, in <module>
backend_1        |     from flask_apispec import FlaskApiSpec
backend_1        |   File "/usr/local/lib/python3.6/site-packages/flask_apispec/__init__.py", line 2, in <module>
backend_1        |     from flask_apispec.views import ResourceMeta, MethodResource
backend_1        |   File "/usr/local/lib/python3.6/site-packages/flask_apispec/views.py", line 6, in <module>
backend_1        |     from flask_apispec.annotations import activate
backend_1        |   File "/usr/local/lib/python3.6/site-packages/flask_apispec/annotations.py", line 6, in <module>
backend_1        |     from flask_apispec.wrapper import Wrapper
backend_1        |   File "/usr/local/lib/python3.6/site-packages/flask_apispec/wrapper.py", line 8, in <module>
backend_1        |     from webargs import flaskparser
backend_1        |   File "/usr/local/lib/python3.6/site-packages/webargs/__init__.py", line 7, in <module>
backend_1        |     from webargs.core import ValidationError
backend_1        |   File "/usr/local/lib/python3.6/site-packages/webargs/core.py", line 11, in <module>
backend_1        |     from webargs.fields import DelimitedList
backend_1        |   File "/usr/local/lib/python3.6/site-packages/webargs/fields.py", line 97, in <module>
backend_1        |     class DelimitedTuple(DelimitedFieldMixin, ma.fields.Tuple):
backend_1        | AttributeError: module 'marshmallow.fields' has no attribute 'Tuple'
backend_1        | unable to load app 0 (mountpoint='') (callable not found or import error)
backend_1        | *** no app loaded. GAME OVER ***
backend_1        | 2020-12-27 22:28:17,753 INFO exited: uwsgi (exit status 22; not expected)

Maybe it's the wrong version of a related package?

Expected username password for pgAdmin4 on startup after first docker-compose up

Hello,
Should I expect the pgAdmin4 username and password to be based upon the given cookiecutter variables?

i.e.
pgadmin_default_user_password
pgadmin_default_user

It seems to be the default([email protected], admin) every time I rebuild the container with new volume. I looked into docker logs for clues if something in the configuration is not right, but the only thing I noticed was that when I manually try to change the password in the UI it fails showing a

SMTP socketerror: [Errno 99]

There is no error messaging when adding a new user via user management

Localhost login error after running Pytest

Once the command:

DOMAIN=backend sh ./script-test.sh

is executed, the containers are stopped and removed. To start the containers again I have used the command:

docker-compose up -d

Through localhost, Traefik, Celery, pgAdmin and Swagger services seem to work without problem, but Vue doesn't allow the login, reporting the error: "Incorrect email or password". I have followed this procedure a couple of times with identical result.

Is it because of a superuser restriction, like having to create another user to keep using the service? How could I recover the access to Vue service without reinstalling the full-stack?

Request: more documentation for configuring/setting up tasks

Specifically in development.

For example, I have added a simple task to worker.py. If I call the test_celery task I can see the response in the celeryworker logs; however, my new task does not run.

I have re-built the celery worker and read the worker.py code from within the running container so I know my new task is there, yet the task does not run when called.

I have added the task to celery_app.py where the task_routes are defined and added my new task to the main-queue like the original test task but still my test task does not run.

I am missing something somewhere?

backports.functools_lru_cache

First -- great stack. Thanks for sharing. The best swarm stack template I've come across pre-rolled.

On ubuntu 14.04 // python 2.7, I encountered this:

$ cookiecutter https://github.com/tiangolo/full-stack
Unable to load extension: No module named functools_lru_cache

This fixed it.

$ pip install backports.functools_lru_cache

Just wanted to share in case others encounter.

FastAPI - Python 3.7 - Nginx - Angular - MariaDB - Docker

Hello, I recently stumbled upon your repositories and looked over the awesome work you have done. It is truly amazing what you can accomplish so quickly with Docker.

I was originally looking to set up a Docker environment with Flask-Nginx-Angular, but after looking at your amazing FastAPI project, I'm leaning in that direction.
Do you plan on creating a Docker setup with FastAPI-Python 3.7-Nginx-MariaDB-Angular?

Thanks for your amazing work!
Bryan

Modify the existing nginx configuration, including an additional nginx module

Hi!
I'm looking to try out a different configuration for nginx to see if it can resolve a rpc connection problem and came across this section on custom nginx configurations
https://github.com/tiangolo/uwsgi-nginx-flask-docker#customizing-nginx-configurations

According to the nginx docs I would need to use ngx_http_v2_module for this directive.

How can include that module in the nginx? Is there a way to include that at a later stage or should I actually rebuild the base image and import that into the backend.dockerfile.

I'm using the appropriate traefik grpc labels and traefik v1.7 with the latest grpc dependencies. I'm not sure if what I'm trying makes sense, background:

I'm trying to communicate to a Dgraph database from the backend container and after a period of inactivity the query from the client returns:
"<_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "OS Error"
debug_error_string = "{"created":"@1546772849.163482552","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1036,"grpc_message":"OS Error","grpc_status":14}"

"
After retrying the same query immediately it does work like it should, if possible, I'd like to prevent this connection error from happening all together. (Also tried changing host tcp settings to recommended values with no effect)

apispec marshmellow error when attempting to run app via manage.py

Hi!
I'm attempting to run the flask app with flask manager. I've simplified it abit from my last project, and it seems to be working.

Using it like this: run command $ python test-app/backend/app/manage.py runserver
manage.py:

from flask_script import Manager
manager = Manager(app)
if __name__ == '__main__':
    manager.run() 

It's been helpful already in quickly correcting a few mistakes I made instead of rebuilding the docker images. The problem I can't seem to resolve right now is, I'm running into this strange apispec error:

File "/Users/ayeg/miniconda3/envs/test-project/test-app/backend/app/app/api/api_v1/endpoints/user.py", line 75, in <module>
  def route_users_post(email=None, password=None, first_name=None, last_name=None): 
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/extension.py", line 119, in register
  resource_class_args, resource_class_kwargs)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/extension.py", line 66, in _defer
  bound()
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/extension.py", line 134, in _register
  paths = self.view_converter.convert(target, endpoint, blueprint)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 37, in convert
  return [self.get_path(rule, target, **kwargs) for rule in rules]
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 37, in <listcomp>
  return [self.get_path(rule, target, **kwargs) for rule in rules]
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 47, in get_path
  for method, view in six.iteritems(operations)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 48, in <dictcomp>
  if method.lower() in (set(VALID_METHODS) - {'head'})
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 60, in get_operation
  'parameters': self.get_parameters(rule, view, docs, parent),
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 90, in get_parameters
  extra_params = converter(schema, **options) if args else []
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/apispec/ext/marshmallow/openapi.py", line 441,in fields2parameters
  prop = self.fields2jsonschema(fields, use_refs=use_refs, dump=False)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/apispec/ext/marshmallow/openapi.py", line 624,in fields2jsonschema
  if field_name in exclude or (field_obj.dump_only and not dump):
AttributeError: 'str' object has no attribute 'dump_only'
(test-project) Bleep-2:test-project ayeg$ python -c "import marshmallow; print(marshmallow.__version__)"
2.16.3
(test-project) Bleep-2:test-project ayeg$ python test-app/backend/app/manage.py runserver
/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:794: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it toTrue or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
None
Traceback (most recent call last):
File "test-app/backend/app/manage.py", line 6, in <module>
  from app.main import app
File "/Users/ayeg/miniconda3/envs/test-project/test-app/backend/app/app/main.py", line 8, in <module>
  from .core import app_setup  # noqa
File "/Users/ayeg/miniconda3/envs/test-project/test-app/backend/app/app/core/app_setup.py", line 21, in <module>
  from ..api.api_v1 import api as api_v1  # noqa
File "/Users/ayeg/miniconda3/envs/test-project/test-app/backend/app/app/api/api_v1/api.py", line 12, in <module>
  from .endpoints import user
File "/Users/ayeg/miniconda3/envs/test-project/test-app/backend/app/app/api/api_v1/endpoints/user.py", line 75, in <module>
  def route_users_post(email=None, password=None, first_name=None, last_name=None, avatar_colors=None): # noqa
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/extension.py", line 119, in register
  resource_class_args, resource_class_kwargs)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/extension.py", line 66, in _defer
  bound()
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/extension.py", line 134, in _register
  paths = self.view_converter.convert(target, endpoint, blueprint)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 37, in convert
  return [self.get_path(rule, target, **kwargs) for rule in rules]
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 37, in <listcomp>
  return [self.get_path(rule, target, **kwargs) for rule in rules]
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 47, in get_path
  for method, view in six.iteritems(operations)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 48, in <dictcomp>
  if method.lower() in (set(VALID_METHODS) - {'head'})
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 60, in get_operation
  'parameters': self.get_parameters(rule, view, docs, parent),
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/flask_apispec/apidoc.py", line 90, in get_parameters
  extra_params = converter(schema, **options) if args else []
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/apispec/ext/marshmallow/openapi.py", line 441,in fields2parameters
  prop = self.fields2jsonschema(fields, use_refs=use_refs, dump=False)
File "/Users/ayeg/miniconda3/envs/test-project/lib/python3.6/site-packages/apispec/ext/marshmallow/openapi.py", line 624,in fields2jsonschema
  if field_name in exclude or (field_obj.dump_only and not dump):
AttributeError: 'str' object has no attribute 'dump_only'

I haven't specified a specified an apispec version during install, should I be using an older version?
Or could this be related to python 2x vs python 3x?

There are also pylint errors throughout the endpoint files on fields.Str() objects which shows:

"module "webargs.fields" has no 'Str' member [E1101]" .

Update: When importing import marshmallow.fields as fields instead of from webargs import fields the pylint error is not shown anymore, but the marshmallow openapi.py error remains. AttributeError: 'str' object has no attribute 'dump_only'.

Br

How to setup Flask-Admin

I would like to add Flask-Admin to my backend. When trying to access the /admin endpoint I get a blank page but with the frontend stopped I get a 404.

To test I've added to app_setup.py the following below where sentry is initialized.

from flask_admin import Admin
admin = Admin(app, name=f"{config.PROJECT_NAME}", template_mode="bootstrap3")

I'm just kinda lost as to what needs to be changed. Any help is much appreciated.

Traefik on Swarm deploy

I've successfully done a swarm deploy and found it curious that while traefik gets pushed out as a proxy image in the deploy, I couldn't reach the app until i added another Traefik stack following the dockerrocks process. (which is great btw). Is that redundant, or does the app use the proxy to internally route to the public Traefik stack?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.