Rejfin / MemeManager

A meme collection management application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MemeManager (WIP)

LICENSE MIT Typescript 4.9 Nodejs Reactjs

Description

A meme collection management application. Thanks to the application the user can tag every file sent to the server, and then when he needs it he can search for it using the appropriate tag.

Instalation

The recommended form of installation is to use docker images and docker compose

  1. Create docker-compose.yml file like this:
version: "3"

services:
  db:
    image: postgres:15
    environment:
      - POSTGRES_DB=meme-manager
      - POSTGRES_USER=postgres # set your database user
      - POSTGRES_PASSWORD=postgres # set your database password
    networks:
      - meme-network
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U postgres" ]
      interval: 5s
      timeout: 5s
      retries: 5
    restart: on-failure
  api:
    image: rejfin/meme-manager-api:latest
    hostname: meme-api
    ports:
      - "3070:3070"
    volumes:
      - "./logs:/app/build/logs"
      - "./memes:/app/build/memes"
    networks:
      - meme-network
    depends_on:
      db:
        condition: service_healthy
    env_file:
      - api.env
  frontend:
    image: rejfin/meme-manager-ui:latest
    ports:
      - "80:80"
    networks:
      - meme-network
    depends_on:
      - api
    volumes:
      - ./config.js:/usr/share/nginx/html/config.js
networks:
  meme-network:
    driver: bridge
  1. Create an api.env file in the same folder as docker-compose.yml and complete it like this:
API_PORT=3070

# DATABASE CONFIG

# name of the docker container with PostgreSql
PG_HOST="db"
# database user name (same as POSTGRES_USER in docker-compose.yml)
PG_USER="postgres"
# database password (same as POSTGRES_PASSWORD in docker-compose.yml)
PG_PASSWORD="postgres"
# database name (same as POSTGRES_DB in docker-compose.yml)
PG_DB="meme-manager"
# database port
PG_PORT=8001

# API CONFIG

# string used to generate JWT token (change it to your)
TOKEN_SECRET="426b41c78f4911f06484f4d377c604cd5f4f63a961599791e83f"
# string used to generate refresh token (change it to your)
TOKEN_REFRESH_SECRET="426b41c78fhgnfhr587hen5i8gn4g4578gn4g1e83f"
# jwt token expiration time
JWT_EXP="12h"
# refresh token expiration time
JWT_REFRESH_EXP="90d"
# log level, available levels: 'info', 'warn', 'error
LOG_LEVEL="info"
NODE_ENV=production
  1. Create config.js file in the same folder as docker-compose.yml and make sure it has the exact structure:
window.env = {
    "API_ADDRESS":"http://mmapi.{your_domain}/api"
}
  1. Start app using docker compose up -d command.

Screenshots


About

A meme collection management application.

License:MIT License


Languages

Language:TypeScript 95.6%Language:JavaScript 3.6%Language:HTML 0.6%Language:CSS 0.3%