Skip to content

Run‐Guide Running the Project

Hagar Usama edited this page Dec 7, 2024 · 1 revision

🚀 Running the Project:

Attention: Before you proceed with the following steps, make sure you have completed the configuration steps outlined here.

Step-by-Step Guide:

  1. Start the Project:

    • In the root directory of your app, open your terminal and run:
      docker compose up
  2. Access the Rails Container:

    • Open another terminal tab and search for the Rails container ID using the image name quicket-web:
      docker ps
    • Once you have the container ID, enter the container:
      docker exec -it <container-id> bash
  3. Run the Database Seed:

    • Before running the seed, feel free to update the admin credentials in the db/seeds.rb file if desired.
      • The seed will insert an admin user with the following credentials by default:
        • Email: admin@quicket.app
        • Password: 123321
    • To run the seed for the first time, execute the following commands:
      echo "alias rails='./bin/rails'" >> ~/.bashrc && source ~/.bashrc
      rails db:seed
  4. Access the Project:

    • Now that the seed has been run and the project is set up, you can access it through either:
      • localhost:3000
      • Or the tunnel address you set up earlier (if using tunneling).

⚠️ Note:

If the pipe is broken in the tunneling service (such as serveo.net), you will need to update the endpoint URL in Tito. Go to your Webhook Configuration in Tito and edit the endpoint URL with the new address generated by your tunneling service.


🔗 Connecting Database with DBeaver

If you want to connect to the database and monitor what happens using a graphical user interface (GUI), you can easily do this with DBeaver.

Steps to Connect:

  1. Open DBeaver:

    • Launch DBeaver on your machine.
  2. Create a New Connection:

    • Click on the socket-like icon for New Database Connection or use the shortcut Ctrl+Shift+N.
  3. Select PostgreSQL:

    • From the available database types, choose PostgreSQL.
  4. Configure the Connection:

    • Enter the connection details based on the configuration in your docker-compose and .env files.
      • Host: localhost (if running locally) or the appropriate tunnel address.
      • Port: 5432 (default for PostgreSQL).
      • Database Name: quicket_development (as defined in .env).
      • Username: postgres (or as defined in .env).
      • Password: password123 (or as defined in .env).
  5. Test the Connection:

    • Click on the Test Connection button to ensure everything is set up correctly.
  6. Create the Connection:

    • If the connection is successful, click Finish. create-db-connection.png db_postgres_config.png

🎉 Voila! You now have a graphical interface to your database and can start monitoring its activity with ease.

Clone this wiki locally