Giter Club home page Giter Club logo

dev-slim's Introduction

SET-UP [Local]

This is to set up the packages used on the enviroment

Database

  • Install mysql [user can be root]

Backend

  • Run "python -m venv venv"
  • Run "pip install -r requirements.txt"

Frontend

  • Run npm install


SWITCH [Local - Docker]

This case is being used a docker version of Mask (not manual networking, instead name of each service as host)

Database

  • Check mysql not open while using docker [both use the same port, this could be fix using mysql image on other port]

Backend

  • Check env.env file [comment variables based on the local or docker mode]

Frontend



RUN [Local]

Development

  • Mysql: initialize the server locally
  • Backend: "python main.py"
  • Frontend: "npm start"

Production Same for Mysql and Backend

  • Frontend: "npm run build" "npm install -g serve" "npm -s build"

Other options to no serve it in an static server could be using an express server to load the static files with NodeJS or other programming languages like Rust, Golang. https://create-react-app.dev/docs/deployment/

Set-Up

  • Backend: "alembic revision --autogenerate -m "first"" "alembic upgrade head"

RUN [Docker]

Development

  • Run "docker-compose --env-file ./docker.env up"

Production

  • Run "docker-compose -f docker-compose.prod.yml --env-file ./docker.env up"

Set-Up

  • Run "docker exec -it ID-backend-python-container /bin/bash" [this command access to the subsystem where python runs]
  • Run "alembic revision --autogenerate -m "first"" [this command creates a driver on mysql to handle migrations]
  • Run "alembic upgrade head" [this command creates the tables based on the python models]

NOTE: The set-up should be run one time, due to mysql has data consistency based on remaning data on a volume [docker-memory]

dev-slim's People

Contributors

lnmmusic avatar

Watchers

 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.