Code Monkey home page Code Monkey logo

prototype_starter_pack's Introduction

Prototype Starter Pack

Simple webapp starter pack using React + Flask + Postgres + Docker-compose

Framework and Libraries used

not exhausive, just listing the ones worth bringing attention to

docker
docker-compose

Frontend

node
node-sass
react
react-bootstrap
react-router
react-icons
axios

Backend

python 3.6
flask
flask-sqlalchemy
flask-migrate

Database

postgres 12
pgadmin 4

Running in Deployment

  1. Build docker containers using docker-compose build
  2. Edit variables accordingly in docker-compose.env
  3. Start docker containers using bash start.sh
  4. Stop docker containers using docker-compose down

Running in Development

Please refer to the readme in frontend/ and backend/ respectively. There are more information and also provides a description to the folder structure.

Notes

Ports Used

During deployment, ports that are used on host are 3000, 5000, 5555 for frontend and backend respectively. During development, ports 3000, 5000, 5432, 5555 are used for frontend, backend, database, database viewer repectively. Difference is because a docker network is used to minimized the use of ports that are not needed to be open on host.

Setting Environment Variables

All env variables that should/might be changed are moved to docker-compose.env. When running start.sh, it will then load the env variables in docker-compose.env. Compared to using the env_file docker-compose option, this will allow us to use env variables in other fields such as volume path.

Questions

Just create an issue and I will answer there. Most probably it will help others too. If it is because you have not read the readme, then you will get a ๐Ÿ˜  emoji

Improvements

Fork and make a PR

prototype_starter_pack's People

Contributors

ernestlwt avatar

Stargazers

Abdelouahed Ben Mhamed avatar  avatar Sambhav Aggarwal avatar Evan avatar Jin Ming Teo avatar mervoc avatar

Watchers

James Cloos avatar  avatar

Forkers

ka2ya

prototype_starter_pack's Issues

Problem with running docker-compose build

Thank you for the great template. Sorry, my question might be silly because I am not very familiar with docker. I manage to adapt it to my case and when I tried to run 'docker-compose build' I get the following error:
โฏ docker-compose build
WARN[0000] The "POSTGRES_USER" variable is not set. Defaulting to a blank string.
WARN[0000] The "POSTGRES_PASSWORD" variable is not set. Defaulting to a blank string.
WARN[0000] The "POSTGRES_USER" variable is not set. Defaulting to a blank string.
WARN[0000] The "POSTGRES_PASSWORD" variable is not set. Defaulting to a blank string.
WARN[0000] The "DATABASE_DIR" variable is not set. Defaulting to a blank string.
WARN[0000] The "PGADMIN_USER" variable is not set. Defaulting to a blank string.
WARN[0000] The "PGADMIN_PASSWORD" variable is not set. Defaulting to a blank string.
1 error(s) decoding:

  • error decoding 'Volumes[0]': invalid spec: :/var/lib/postgresql/data/pgdata: empty section between colons

Thank you for helping me with this.

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.