Git Product home page Git Product logo

g3w-client's Introduction

G3W-CLIENT v3.7.0-alpha.0

License

G3W-SUITE scripts and configuration files needed to set up a suitable local development enviroment for the g3w-client cartographic viewer.

g3w-client


Project setup

Download and install Node.js and NPM and Docker Compose in your development enviroment.

Clone and place the g3w-suite-docker, g3w-admin and g3w-client repositories into three separated adjacent folders:

cd /path/to/your/development/workspace

git clone https://github.com/g3w-suite/g3w-suite-docker.git --single-branch --branch dev ./g3w-suite-docker
git clone https://github.com/g3w-suite/g3w-admin.git --single-branch --branch dev ./g3w-admin
git clone https://github.com/g3w-suite/g3w-client.git --single-branch --branch dev ./g3w-client

Download all javascript and docker dependencies from within your g3w-client local repository:

cd ./g3w-client
npm install         # javascript dependencies (client)
npm run docker pull # docker dependencies (admin)

Create these configuration files from the available templates:

And check that the following parameters are set as follows:

# /g3w-suite-docker/.env

WEBGIS_DOCKER_SHARED_VOLUME=./shared-volume # path to docker container shared volume
G3WSUITE_LOCAL_CODE_PATH=../g3w-admin       # path to local g3w-admin folder
G3WSUITE_DEBUG=True                         # default: False

Now your folder structure should matches this one:

.
├── g3w-admin/
│
├── g3w-client/
│   ├── node_modules/
│   ├── package.json
│   ├── package-lock.json
│   └── config.js
│
└── g3w-suite-docker/
    ├── config/
    │   └── g3w-suite/
    │       └── settings_docker.py
    ├── shared-volume/
    ├── scripts/
    │   └── docker-entrypoint-dev.sh
    ├── .env
    ├── docker-compose-dev.yml
    └── README_DEV.md
    

For more info about this project dependencies see:


How to develop

You can start the built-in development servers by using the following:

npm run docker:up # g3w-admin
npm run dev       # g3w-client

If everything went fine, you can now visit you local development server URL to see changes, the following rules are applied:

# EXAMPLE 1:
# project_group = "countries";
# project_type  = "qdjango";
# project_id    = "1"

http://localhost:8000/en/map/countries/qdjango/1   # g3w-admin  (production)
http://localhost:3000/?project=countries/qdjango/1 # g3w-client (development)
# EXAMPLE 2:
# project_group = "eleprofile";
# project_type  = "qdjango";
# project_id    = "2"

http://localhost:8000/en/map/eleprofile/qdjango/2   # g3w-admin  (production)
http://localhost:3000/?project=eleprofile/qdjango/2 # g3w-client (development)

FAQ

1. How can I start or stop docker containers?

For those unfamiliar with docker development docker-compose is a tool for defining and running multi-container applications.

Below are described the most frequent commands, that are also available here in this repository as npm scripts, you can find similar information by running npm run from the command line.

Define and run the services that make up the g3w-client (admin) development server:

docker
  docker compose --env-file ../g3w-suite-docker/.env --file ../g3w-suite-docker/docker-compose-dev.yml --project-name g3w-suite-docker --project-directory ../g3w-suite-docker

Create and start containers (run default admin server at localhost:8000):

docker:up
  npm run docker up -- -d

Stop and remove containers, networks, images, and volumes:

docker:down
  npm run docker down

Validate and view the Compose file (load and parse docker-compose-dev.yml and .env variables):

docker:config
  npm run docker config

View output from containers:

docker:logs
    npm run docker logs

For more info:

2. How can I inspect actual docker configuration?

If you are having trouble with your current project configuration you can use the docker config command to inspect the actual values of the variables passed to your docker container:

npm run docker config

If your container struggles to boot properly you can also use the docker logs command related to a specific container:

npm run docker logs g3w-suite -- -f
npm run docker logs postgis -- -f

For more info:

3. How can I translate this project?

Depending on your current project version, you can edit one of the following files and then submit a pull request:

  • /g3w-client/src/locales/ (> v3.4)
  • /g3w-client/src/config/i18n/index.js (<= v3.4)

Changelog

All notable changes to this project are documented in the releases page.


Compatibile with: g3w-admin version g3w-suite-docker version


License: MPL-2

g3w-client's People

Contributors

fbellina avatar giohappy avatar raruto avatar tudorbarascu avatar volterra79 avatar wlorenzetti avatar

Stargazers

 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.