GithubHelp home page GithubHelp logo

zoobdude / dict Goto Github PK

View Code? Open in Web Editor NEW

This project forked from likes-gay/dict

0.0 0.0 0.0 699 KB

An Urban dictionary clone that anyone can add words to.

Home Page: https://dict.likes.gay

License: The Unlicense

Shell 1.26% JavaScript 4.91% Python 17.31% TypeScript 55.59% CSS 17.50% HTML 2.06% Dockerfile 1.37%

dict's Introduction

Dict

Site

See it live: https://dict.likes.gay

This site is hosted in a Docker container on a Raspberry Pi.

About

Frontend

  • Written in TypeScript
  • Compiled using the first job in the GitHub Action

Backend

  • Written in Python
  • FastAPI used to run the API and serve static files
  • TinyDB used to store the words

GitHub Actions

  • Compiles the TypeScript
  • Compiles Docker Image
  • Pushes to Docker Hub

How to run

Production

The easiest and most secure way to run this is using our offcial Docker image.

  • Make sure to replace the SECRET_KEY in the command
  • The default port it runs on is 8000. Change the first port to change the host port.
  • The volume sets where the database file should be stored, so it persits. This defaults to the directory the command is run in.
  • The detach argument runs the container in the background.
  • The name argument sets the name
docker run -e SECRET_KEY="SET_SECRET_KEY_HERE" --publish 8000:8000 --volume $(pwd)/dict-data:/backend/dict-data --detach --restart always --name Dict likesgay/dict

The Docker container can automatically be updated to the latest image using Watchtower.

Dev

  1. Run npm run build:dev in frontend
  2. Run uvicorn main:app --reload in backend

We also have a dev branch.

And dev_run.sh installs all the dependencies and runs those commands.

dict's People

Contributors

yummybacon5 avatar zoobdude avatar dependabot[bot] avatar

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.