Skip to content
forked from maevsi/maevsi

A manager for events supported by invitees.

License

Notifications You must be signed in to change notification settings

AlexSteckler/maevsi

 
 

Repository files navigation

build status Language grade: JavaScript

maevsi

The manager for events supported by invitees: maev.si.

This project is deployed within the maevsi_stack in accordance with the DargStack template to make deployment a breeze.

Welcome

Table of Contents

  1. Development
    1. Preparation
    2. Setup
    3. Container Management
    4. Sqitch
  2. Technology

Development

You could simply use Node.js and pnpm to run pnpm run dev and have a development server running on your machine, but you'd be missing a backend to serve data to display. The following steps show how to start the full development stack:

Preparation

  1. if you're on Windows, setup WSL to be able to use all Linux functionality this project utilizes
  2. install Git to download this project's modules and participate in version management
  3. install Docker so that all services run in their containers
  4. install dargstack to bootstrap a Docker stack setup
  5. install nvm to be able to switch the currently active Node.js version on your machine
  6. install mkcert for development certificate generation and installation, so that all services are available through https

Setup

  1. create a directory named maevsi in a directory of your liking
  2. download the project modules maevsi, maevsi_stack and stomper into that newly created directory:
    cd maevsi
    git clone https://github.com/maevsi/maevsi.git
    git clone https://github.com/maevsi/maevsi_stack.git
    git clone https://github.com/maevsi/stomper.git
    maevsi contains the frontend and database migrations, maevsi_stack is the service configuration and stomper is the service that sends out emails.
  3. switch into the maevsi subdirectory and setup Node:
    cd maevsi
    nvm install
    nvm use
  4. then install all dependencies using pnpm, including the nuxt directory:
    corepack enable
    pnpm install
    
    cd nuxt
    pnpm install
    If there is an issue regarding OpenSSL, then you might want to set the environment variable NODE_OPTIONS=--openssl-legacy-provider and try again.
  5. configure maevsi's DargStack then:
    cd ../../maevsi_stack/src/development
    cp stack.env.template stack.env
    pnpm store path
    vim stack.env # fill PNPM_STORE_DIR with what's printed by the previous command
  6. install a root development certificate on your system and create subcertificates for the application:
    mkcert -install
    ./certificates/mkcert.sh
  7. you are now ready to start everything up:
    cd ../../
    dargstack deploy
  8. finally, create the Docker development images for maevsi and stomper so that their services start successfully:
    dargstack build maevsi
    dargstack build stomper

Container Management

To see if services are running or not you can use Portainer if you prefer a web view instead of the command line:

sudo docker run --name portainer --restart=always -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

Access Portainer on http://localhost:9000 then. Create a user, add an environment, start the Docker wizard, choose "Socket", name it e.g. "local" and close the wizard. Under "home", select the newly created environment then. You'll have access to all containers, images, volumes and more via the left sidebar then.

Sqitch

In case you want to apply or revert the database migrations, you need to use Sqitch.

The sqitch directory in this repository contains a sqitch executable that you can use to interact with the migrations residing in the directory's subdirectories. For example, run ./sqitch deploy to fill the database with structure like tables, types and policies.

In case you want to be able to simple call sqitch deploy without ./ instead, add an alias sqitch="./sqitch" to your shell configuration (~/.bashrc, ~/.zshrc, ...).

Technology

Nuxt.js

PostGraphile

Sqitch

About

A manager for events supported by invitees.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 52.8%
  • Vue 35.6%
  • PLpgSQL 9.3%
  • JavaScript 0.8%
  • Dockerfile 0.6%
  • Shell 0.6%
  • CSS 0.3%