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.
|
|
||||
|
|
|
|||
|
|
|
|||
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 buildThen, 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 secretAfter that, run the database migrations by running the following:
docker compose run backend rails db:migrateThen, you can run the container with docker compose up -d. PCList will be running on the port 3000.
- Set up a PostgreSQL database. Install Ruby, Node.js, yarn, libvips, libpq-devel and clone this repository
- Install dependencies
bundle install
yarn install- 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






