Giter VIP home page Giter VIP logo

admin-console's Introduction

Prerequisites

The CrossCloud Administrator console uses Docker for its development environment.

Installing Docker on OSX

Please install Docker CE for Mac.

Installing Docker on Linux

To install Docker on Linux use instructions for your distribution from https://docs.docker.com/engine/installation/. Don't use packages available in the default repositiory of your distribution - they are outdated. After installing the main docker package install also docker compose according to https://docs.docker.com/compose/install/. Please remember that docker and docker-compose commands should be run as a superuser or alternativelly additional configuration is required (https://docs.docker.com/engine/installation/linux/ubuntulinux/#/manage-docker-as-a-non-root-user).

Installing Docker on Windows

To install Docker on Windows download the installation package from https://docs.docker.com/docker-for-windows/ and run it. After installation, if you don't have Hyper-V enabled, agree to enable it and restart the machine. Then right-click on the docker icon in the taskbar, and click settings. In the settings window go to Shared Drives, select drives where the source code of the Administator Console is, and click Apply.

In order to make autoreloaders to work on windows please run the following command:

cp .env.sample.windows .env

WARNING: file system events on mounted volumes don't work on Windows. Autoreloaders use pooling instead which could be slow and cpu hungry.

Running

Run the following command before you run the app the first time:

docker network create crosscloud-dev

To run the CrossCloud Administrator console use the following command:

docker-compose up

The first run takes some time because base images are downloaded and dependencies are installed. Autoreloaders are configured for both api and react part of the app so usually, there is no need to do manual restarts after changes in the source code.

The app is available on 127.0.0.1 (port 8000).

To stop the app press CTRL-C in the terminal. You should see messages similar to the following:

Stopping crosscloudadminconsole_frontend_1 ... done
Stopping crosscloudadminconsole_api_1 ... done
Stopping crosscloudadminconsole_db_1 ... done

In some cases they don't appear - then another command is needed:

docker-compose stop

Caveats

  • Please remove folders api/node_modules and react/node_modules if you used a non-dockerized version before.

Code linting

Run yarn install in the root folder of the repository to install packages required for linting. This command also install precommit hook which formats the code using Prettier and checks it using Eslint.

You can also run yarn run prettier to format code in the whole repository and yarn run eslint to check all .js files before commit.

admin-console's People

Watchers

zw avatar  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.