/pclist

MyPCList clone in Rails

Primary LanguageRubyGNU Affero General Public License v3.0AGPL-3.0

PCList

MyPCList clone in Rails. Allows user to create an account, add, edit and delete their machines (PCs, laptops, etc) and browse through others' profiles and machines.

Profile page with a list of user's machines (desktops and laptops) Machine page - showing a title, data like release date, condition, type, etc; a photo and description

Running in Docker

Assuming you have Docker installed, clone this repository and copy docker-compose.example.yml as docker-compose.yml. Then, from the repository root, run the following command to build the image:

docker compose build

Then, run the following commands and paste the outputs in the corresponding fields in docker-compose.yml file.

docker compose run backend rails secret | cut -c-32
docker compose run backend rails secret

After that, run the database migrations by running the following:

docker compose run backend rails db:migrate

Then, you can run the container with docker compose up -d. PCList will be running on the port 3000.

Development

  1. Set up a PostgreSQL database. Install Ruby, Node.js, yarn, libvips, libpq-devel and clone this repository
  2. Install dependencies
bundle install
yarn install
  1. Export environment variables (replace the values with yours), run migrations and start the dev server
export DATABASE_HOST=localhost DATABASE_NAME=pclist DATABASE_USER=postgres DATABASE_PASSWORD=ifYouHaveAny
bin/rails db:migrate
bin/dev