Sign inSign up

donatmolnar/redditdockercompose

By donatmolnar

Updated over 5 years ago

Image
0

92

donatmolnar/redditdockercompose repository overview

Reddit app

Description

After the overwhelming success of donatmolnar/reddit the docker-compose compatible version of the original has been created.

This is a reddit lookalike webapp created purely for learning purposes.

Technical details

Utilized technologies:

  • Frontend: VanillaJS
  • Backend:
  • Node.js 15.8.0
  • Express 4.17.1
  • MySQL 2.18.1
  • Database: MySQL
  • OS: alpine 3.10
Features
  • List entries from the database on the landingpage in form of posts
  • Posts:
  • Add new posts
  • Clicking on post title redirects to the provided url
  • Upvote/downvote posts
  • Modify posts (in progress: ETA TBD)
  • User handling (ETA TBD)
Usage

Pull the image:

docker pull donatmolnar/redditdockercompose<:tagname>

To run the image you will need a docker-compose.yml and a data.sql file.

Then you can run the following command:

docker-compose up

Your .sql database should be built like this:

CREATE TABLE `posts` (
	`post_id` INT NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(500) NOT NULL DEFAULT 'placeholder_title',
	`url` VARCHAR(1000) NOT NULL DEFAULT 'http://example.com/',
	`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	`score` INT NOT NULL DEFAULT 0,
	`owner` VARCHAR(100) NOT NULL DEFAULT 'placeholder_user',
	`is_active` BOOLEAN NOT NULL DEFAULT true,
	PRIMARY KEY (`post_id`)
);

Tag summary

Content type

Image

Digest

Size

46.5 MB

Last updated

over 5 years ago

docker pull donatmolnar/redditdockercompose:1.1.0