Skip to content

How to develop a fullstack systematically

This project talks about how to develop a full stack application systematically using python framework fastapi and other supporting libraries. This project makes use of docker-compose to integrate different services together to achive a production ready application.

Create Project

Make a new empty folder and open it using VSCode

DB Initialization

  • create docker-compose.yml file in the empty folder and add the below contents.

  • ```docker services: db: image: postgres:alpine restart: always # set shared memory limit when using docker \ shm_size: 128mb ports: - 5432:5432 env_file: - .env environment: # - POSTGRES_USER=\({POSTGRES_USER} - POSTGRES_PASSWORD=\) volumes: - db:/var/lib/postgresql/data

    adminer: image: adminer:5-standalone restart: always ports: - 8080:8080 volumes: db: ```

  • This uses postgres-db and a DB viewer application called Adminer.

  • Create a .env file beside the compose file as it is being used by the compose file.

  • Add an entry POSTGRES_PASSWORD=kjhviKJYfuyvhB in .env file.

  • Start the compose file using docker-compose up -d

  • Go to localhost:8080 to view the adminer dashboard and login to postgress

  • default user name : postgres

  • password : kjhviKJYfuyvhB