Git Product home page Git Product logo

berth-reservations-admin's Introduction

Berth Reservation UI

Build Status Codecov GitHub issues GitHub forks Dependency Status devDependencies Status GitHub license

Prerequisites

  • Node.js 12.x and yarn, or Docker and docker.compose
  • Recommended editor for this project is VSCode.

Environments

Storybook: https://city-of-helsinki.github.io/berth-reservations-admin/?path=/story/*

GraphQL API URL: https://venepaikka-api.test.hel.ninja/graphql_v2/

Staging: https://venepaikka-admin.test.kuva.hel.ninja

Setup

After cloning this repository, create a new .env.local file from the provided .env.example file and change REACT_APP_API_URI.

$ cp .env.example .env.development.local

Development

To start development environment, run:

$ yarn start

This will start the application on port 3000.

To only start the storybook on port 6006:

$ yarn storybook

Starting dockerized development environment

  1. Check if Docker and docker CLI installed, port 3000 is free, not occupied by running server.

  2. Make sure you have env variables in .env.development.local, otherwise extend it from example by:

    $ cp .env.example .env.development.local
    
  3. Start building docker image and start container:

    $ docker-compose up
    
  4. Open localhost:3000 on browser.

Starting dockerized production environment

  1. Check if Docker and docker CLI installed, port 80 is free, not occupied by running server.

  2. Build docker image with:

$ docker build -t berth-reservation-admin .
  1. Start docker container with:
    $ docker container run -p 80:80 -d berth-reservation-admin
    
  2. Open http://localhost on browser.

Testing

To run tests:

$ yarn test

Useful docker command

  • To rebuild the docker images:
    $ docker-compose up --force-recreate --build
    
  • To enter inside docker container environment:
    $ docker-compose exec app sh
    
  • Remove docker container if needed:
    $ docker rm -f berth-reservation-admin
    
  • Remove docker image:
    $ docker rmi berth-reservations-admin_app
    
  • Running command inside Docker environment (test for example): (Make sure docker container is running) $ docker-compose run app YOUR_COMMAND_HERE
  • Encounter node-sass issue ? try to go inside docker container environment and run npm rebuild node-sass

berth-reservations-admin's People

Contributors

antti-mikael avatar nizar-rahme 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.