Skip to content

DevOps-2024-group-p/maxitwit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maxitwit

This is a student project for the course, DevOps, Software Evolution and Software Maintenance, at ITU. The project is an implementation of the minitwit application

Table of Contents

Stack

Node + express + prisma + vagrant + docker

Development Setup

Prerequisites

  • docker
  • node && npm

Steps

  1. Clone the repo.

  2. Create and populate .env with appropriate values in the root of the project.

    Currently, the .env file will have to be populated in the following way:

    TARGET= # sets docker image build target, valid values: development, production
    DATABASE_URL="postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]"
    SESSION_SECRET= # session store secret, must be set. use random value for development
  3. Choose whether to build locally or in a container.

Docker Setup

Use the following connection string for containerized development in the .env file you created:

DATABASE_URL="postgresql://pguser:pgpassword@postgres:9998/localdb"

Build and start containers:

docker compose up --build -d

Seed the db server in the container:

docker exec maxitwitserver npm run seed

To remove the containers:

docker compose down

Local Setup

To run the application locally:

npm install
npm run devstart 

Testing

Containerized Testing

Runs test.sh:

  • Builds test containers
  • Runs pytest against them.
npm run test

Helpful Docs

Prisma FAQ

How do I...

Contribution and Workflow

  1. Make a feature branch and make your changes.

  2. Stage your changes.

  3. Use commitizen CLI tool to format your commit message to the standard

    Example:

    git checkout -b feature/<my-feature-branch>
    git status
    $ modified:   Dockerfile.api
    git add Dockerfile.api
    npm run cz
  4. Open a pull request.

Specification

This README is compliant with the Standard README spec.

License