Coder Social home page Coder Social logo

trellixvulnteam / fullstack-application-fastapi-vue.js_k5xd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from albertorainieri/fastapi-vue

0.0 0.0 0.0 7.49 MB

Dockerized application with fastapi backend, vue.js frontend, mysql and phpmyadmin

Shell 0.08% JavaScript 2.65% Python 2.96% TypeScript 18.39% HTML 0.13% Mako 0.10% Vue 59.88% Dockerfile 0.21% SCSS 15.60%

fullstack-application-fastapi-vue.js_k5xd's Introduction

Overview

FastApi Application with Mysql, PhpMyAdmin

Setup

Fill in the .env file

Install

Create and Running

$ docker-compose up -d --build

MySql configuration

Enter MySql container. Enter mysql console and create a new user

$ CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
# CREATE USER 'newuser'@'%' IDENTIFIED BY 'password';
$ GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
# GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'%';
$ FLUSH PRIVILEGES;

Alembic

Enter backend container and run:

$ alembic revision --autogenerate -m "First Migration";
$ alembic upgrade head;

Reset Containers if something goes wrong.

issues

frontend container might run into issues. DevDependencies might not be found because they are not installed globally. This may happen if you tried to create the containers many times. In this case, just remove old images/containers and rebuild the frontend image. If this does not work, you can also fix the issue by running $ npm audit fix inside the container. In order to do that, you need to slightly modify the CMD command in the Dockerfile with "CMD [ "http-server", "./dist" ]", otherwise you can not access the container.

Other issues can be related to alembic (migration tool). Alembic is installed in the backend container. In case something goes wrong, remove tables if present in the mysql (you can use Phpmyadmin for this) and remove alembic/ and alembic.ini in the backend container. Restart alembic by doing "alembic init alembic" and configure "sqlalchemy.url" and "metadata" in the alembic/env.py file. Find more information here "https://alembic.sqlalchemy.org/en/latest/autogenerate.html" Hope this helps.

Frontend

http://localhost Try this markdown:

alt text

Check Api Specifications

http://localhost:5000/docs

alt text

fullstack-application-fastapi-vue.js_k5xd's People

Contributors

albertorainieri avatar trellixvulnteam avatar

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.