Giter Club home page Giter Club logo

rps's Introduction

Rock Paper Scissors Game

This project is a Rock Paper Scissors game consisting of a Rails API backend and a Next.js frontend. The application is containerized using Docker and Docker Compose.

Prerequisites

Before you begin, make sure you have the following installed on your machine:

Setup

  1. Clone the repository:

    git clone https://github.com/sikor144/rps.git
    cd rps
  2. Copy the example environment variables file:

    cp .env.example .env
  3. Edit the .env file to configure the environment variables:

     DATABASE_URL=postgres://rps_api:your_password@postgres:5432/rps_api_production
     RPS_API_BASE_URL=https://private-anon-c0651d3e1b-curbrockpaperscissors.apiary-mock.com
     SECRET_KEY_BASE=your_secret_key_base

Running the Application

  1. Build and start the Docker containers:

    docker-compose up --build

    This command will build and start the following services:

    • postgres: PostgreSQL database
    • api: Rails API backend
    • web: Next.js frontend
  2. Access the application:

Services

  • PostgreSQL: The database service
  • API: The Rails backend service
  • Web: The Next.js frontend service

Stopping the Application

To stop the application, run:

docker-compose down

This command will stop and remove the containers defined in your docker-compose.yml.

Additional Commands

  • Running commands inside the containers:

    You can run commands inside the API or Web container using docker-compose exec. For example, to open a bash shell inside the API container, use:

    docker-compose exec api bash

rps's People

Contributors

sikor144 avatar

Watchers

 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.