Coder Social home page Coder Social logo

g3w-suite / g3w-suite-docker Goto Github PK

View Code? Open in Web Editor NEW
28.0 6.0 31.0 60.64 MB

Run G3W-SUITE stack with docker-compose

Home Page: https://g3w-suite.readthedocs.io/en/latest/docker.html

Dockerfile 9.95% Shell 15.42% Python 17.50% HTML 54.73% Makefile 2.40%

g3w-suite-docker's Introduction

G3W-SUITE-DOCKER

Build G3W-SUITE image Build dependencies

Run a self hosted web-gis application with Docker Compose

⬆️ How to upgrade from v3.7 to v3.8

Since v3.8 PostgreSQL/PostGIS changed from v11/2.5 to v16/3.4, to upgrade follow below steps:

# NB:
# • (ENV = dev)      → docker-compose-dev.yml
# • (ENV = prod)     → docker-compose.yml
# • (ENV = consumer) → docker-compose-consumer.yml

### BACKUP (v3.7.x) ###

docker compose up -f docker-compose-dev.yml up -d

git fetch
git checkout v3.8.x

make db-backup ID=11 ENV=prod

### RESTORE (v3.8.x) ###

make db-restore ID=11 ENV=prod

### OPTIONAL (delete old DB) ###

docker compose exec g3w-suite bash -c 'rm -r /shared-volume/11'
docker compose exec g3w-suite bash -c 'rm -r /shared-volume/backup/11'

Docker structure

🌍 Deploying your webgis app

Install docker compose.

Clone this repository:

git clone https://github.com/g3w-suite/g3w-suite-docker/
cd g3w-suite-docker

Create a .env file starting from .env.example and tailor it to your needs:

# CHANGE ME: PostGIS DB password

- G3WSUITE_POSTGRES_PASS='89#kL8y3D'
+ G3WSUITE_POSTGRES_PASS=<your__password>

Start containers:

docker-compose up -d

or, if you intend to use huey (batch processing)

docker-compose -f docker-compose-consumer.yml up -d

NB: at the very first start, have a lot of patience 😴 → the system must finalize the installation. *

After some time the suite will be available at:

Login Page

* in case of faulty container (eg. the first time you didn't wait long enough before trying to access):

# 🚨 deletes all data
make db-reset ENV=prod

# or
# make db-reset ENV=consumer 

💻 How to access into a container

  1. login into a service
$ make run-postgis ENV=prod

# make run-g3w-suite ENV=prod
# make run-nginx ENV=prod
# make run-redis ENV=prod
  1. perform your administrative tasks (eg. connect to postgis as "postgres" user):
root@84ef6a8d23e6:/# su - postgres

postgres@84ef6a8d23e6:~$ psql
psql (11.2 (Debian 11.2-1.pgdg90+1))
Type "help" for help.

postgres=#

🔒 HTTPS

To enable https with LetsEncrypt::

  • uncomment ssl section within config/nginx/nginx.conf
  • update WEBGIS_PUBLIC_HOSTNAME environment variable within the .env and config/nginx/nginx.conf files
  • launch sudo make renew-ssl
  • make sure the certs are renewed by adding a cron job with sudo crontab -e and add the following line: 0 3 * * * /<path_to_your_docker_files>/run_certbot.sh

📦 Docker image

Docker compose will usually download images from: https://hub.docker.com/u/g3wsuite

A custom (local) docker image for the suite can be created with:

docker build -f Dockerfile.g3wsuite.dockerfile -t g3wsuite/g3w-suite:dev --no-cache .

# OPTIONAL:
# docker build -f Dockerfile.g3wsuite-deps.ltr.dockerfile -t g3wsuite/g3w-suite-deps-ltr:dev --no-cache .

The image is build on latest Ubuntu and QGIS LTR, following this execution order:

  1. Dockerfile.g3wsuite-deps.ltr.dockerfile ← installs Ubuntu and QGIS LTR
  2. Dockerfile.g3wsuite.dockerfile ← run "setup.sh" and "docker-entrypoint.sh"
  3. scripts/setup.sh ← install g3w-admin and some other python plugins
  4. scripts/docker-entrypoint.sh ← start gunicorn

🎨 Style customization

  • custom templates folder: config/g3w-suite/overrides/templates → a Docker service restart is required to make the changes effective.
  • custom logo (see: docs): config/g3w-suite/settings_docker.py → a Docker service restart is required to make the changes effective.
  • custom CSS: config/g3w-suite/overrides/static/style.css → changes are effective immediately

🚀 Performance optimizations

  1. set scale-dependent visibility for the entire layer or for some filtered features (example: show only major roads until at scale 1:1E+6)
  2. when using rule-based/categorized classification or scale-dependent visibility create indexes on the column(s) involved in the rule expression (example: "create index idx_elec_penwell_ious on elec_penwell_ious (owner);" )
  3. start the project with only a few layers turned on by default
  4. do not turn on by default base-layers XYZ such as (Google base maps)
  5. do not use rule-based/categorized rendering on layers with too many categories (example: elec_penwell_public_power), they are unreadable anyway
  6. enable redering simplification for not-point layers, set it to Distance 1.2 and check Enable provider simplification if available
  7. enable cache on linestring and polygon layers (tile cache can be configured and cleared per-layer through the webgis admin panel and lasts forever until it is disabled or cleared)
  8. set a cron job on host machine that checks edited features that have been locked for more than 4 hours and frees them:
0 */1 * * * docker exec g3w-suite-docker_g3w-suite_1 python3 /code/g3w-admin/manage.py check_features_locked

🐋 Portainer usage

Portainer (https://www.portainer.io) is a docker-based web application used to edit and manage Docker applications in a simple and intuitive way.

Plese refer to the Add new stack section to learn how to deploy the docker-compose-consumer.yml stack with Portainer (>= v2.1.1).

♻️ Database backup / restore

# NB:
# • (ENV = dev)      → docker-compose-dev.yml
# • (ENV = prod)     → docker-compose.yml
# • (ENV = consumer) → docker-compose-consumer.yml

docker compose up -f docker-compose.yml up -d

make backup-db ID=foo-backup ENV=prod
make restore-db ID=foo-backup ENV=prod

Contributors

g3w-suite-docker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

g3w-suite-docker's Issues

Openssh-error

err_6
Sto installando la versione dockerizzata, ma quando eseguo il comando "docker build --build-arg G3W_SUITE_BRANCH=v.3.2.x -f Dockerfile.g3wsuite.dockerfile -t g3wsuite/g3w-suite:v3.2.x --no-cache .", ho il seguente errore.
Come posso risolverlo?

Add some info related to `manage.py` (docker exec)

For admin users it might be quite useful to know how to correctly run the manage.py command (ie. adding the -e DISPLAY=:99 and -w /code/g3w-admin parameters):

docker exec -it -e DISPLAY=:99 -w /code/g3w-admin <CONTAINER ID / NAME> python3 manage.py

Currently (v3.4) the only reference to the DISPLAY environment variable is quite hidden within the editing section:

Editing module is active by default, to avoid simultaneous feature editing by two or more users, the editing module works with a feature lock system.
This locking system can remain active if users do not exit the editing state correctly, to avoid this it is advisable to activate a cron job on host machine that checks the features that have been locked for more than 4 hours and frees them:

0 */1 * * * docker exec -e DISPLAY=:99 g3w-suite-docker_g3w-suite_1 python3 /code/g3w-admin/manage.py check_features_locked

Related to: g3w-suite/g3w-client#183

Enable multiple backends which are OGC compliant

Problem

Since QGIS is ogc compliant and this is meant to create maps which are rich in cartography or bridging the gap between QGIS Server and publishing maps it would be nice to be able to add other sources from OWS services

ie GeoServer,Mapserver

WMS GetCapabilities advertise on http although everything was setup as https

Hi, first of all thanks for this very nice project and the foss4g workshop, it was great.

Now that I had time to test things in deployment I did all the steps for https and everything works out allright except the GetCapabilities response which is advertising the links with http instead of https.

Is there an extra step to follow?

Thank you,

All the best

Informazioni configurazione file env

Buongiorno,

avrei un paio di domande per quanto riguarda la configurazione del file .env della versione dockerizzata.
Per quanto riguarda il database, posso lasciare le credenziali già inserite nel file o devo impostare le credenziali di un database che devo comprare?
Per far partire il programma in localhost, devo impostare il WEBGIS_PUBLIC_HOSTNAME con http://localhost?

Check or add some info about the `DEV` environment variable

As per v3.4, this is what is currently reported in the /scripts/docker-entrypoint.sh file:

# When building in dev env you might want a clean build each time.
if [[ -z "${DEV}" ]]; then
rm -rf /shared-volume/build_done
fi

Check if the variable is still in use or else give us some information on where it is actually set.

NB the following published compose files do not list any DEV variables:

Remove `/config/_nginx/django_conf.ssl`

Except for special needs, the entire configuration would gain readability and maintainability by configuring a single server that could handles both HTTP and HTTPS requests (for the latter rules it should be enough to keep them commented to keep them disabled).


As per v3.4, this is what states the readme file:

HTTPS additional setup

To active https with LetsEncrypt just follow the following instructions:

  • move config/_nginx/django_ssl.conf to config/nginx/django_ssl.conf
  • check the domain name in the .env file and in config/nginx/django_ssl.conf
  • run: docker pull certbot/certbot
  • launch ./run_certbot.sh
  • activate 301 redirect into config/nginx/django.conf
  • restart compose
  • make sure the certs are renewed by adding a cron job with crontab -e and add the following line:
    0 3 * * * /<path_to_your_docker_files>/run_certbot.sh
  • if you disabled HTTPS, you can move config/nginx/django_ssl.conf back to its original location now, and restart the Docker compose to finally enable HTTPS

client_max_body_size 200M;
client_body_timeout 600;
upstream web {
ip_hash;
server g3w-suite:8000;
}
# portal
server {
# Block *.php
location ~\.php$ {
return 404;
}
# Secure project's folder
location /static/projects/ {
return 403;
}
location /static/ {
root /shared-volume/;
}
location /media/ {
root /shared-volume/;
}
location /media_user/ {
root /shared-volume/project_data/;
}
# Certbot configuration
location /.well-known/acme-challenge/ {
root /var/www;
}
# Comment this if you enable HTTPS
location / {
keepalive_timeout 500;
proxy_connect_timeout 600;
proxy_send_timeout 600;
send_timeout 600;
fastcgi_read_timeout 300;
proxy_read_timeout 600;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://web/;
}
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# Uncomment the following lines if you want activate https
# and comment the previous location / declaration
#location / {
# return 301 https://$host$request_uri;
#}
# Listen
listen 8080;
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# NOTE: change server_name according to your real hostname
server_name dev.g3wsuite.it;
}

# HTTPS portal
server {
location ~\.php$ {
return 404;
}
# Secure project's folder
location /static/projects/ {
return 403;
}
location /static/ {
root /shared-volume/;
}
location /media/ {
root /shared-volume/;
}
location / {
proxy_read_timeout 120;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://web/;
}
listen 443 ssl;
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# NOTE: change server_name and cert paths according to
# your real hostname
server_name dev.g3wsuite.it;
ssl_certificate /etc/letsencrypt/live/dev.g3wsuite.it/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dev.g3wsuite.it/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
resolver 8.8.8.8;
}

#!/bin/bash
# Run certbot docker container to renew the HTTPS certificate.
# Requires .env file with container configuration variables
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source ${CURRENT_DIR}/.env
if [ "${WEBGIS_PUBLIC_HOSTNAME}" = "" ]; then
echo "WEBGIS_PUBLIC_HOSTNAME not defined: exiting"
exit 1
fi
if [ "${WEBGIS_DOCKER_SHARED_VOLUME}" = "" ]; then
echo "WEBGIS_DOCKER_SHARED_VOLUME not defined: exiting"
exit 1
fi
mkdir -p "${WEBGIS_DOCKER_SHARED_VOLUME}/certs/letsencrypt/"
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > "${WEBGIS_DOCKER_SHARED_VOLUME}/certs/letsencrypt/options-ssl-nginx.conf"
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem > "${WEBGIS_DOCKER_SHARED_VOLUME}/certs/letsencrypt/ssl-dhparams.pem"
docker run -it --rm --name certbot \
-v ${WEBGIS_DOCKER_SHARED_VOLUME}/certs/letsencrypt:/etc/letsencrypt \
-v ${WEBGIS_DOCKER_SHARED_VOLUME}/var/www/.well-known:/var/www/.well-known \
certbot/certbot -t certonly \
--agree-tos --renew-by-default \
--no-eff-email \
--webroot -w /var/www \
-d ${WEBGIS_PUBLIC_HOSTNAME}


More info:

dependencies image build error

When I issue the command:
docker build -f Dockerfile.g3wsuite-deps.ltr.dockerfile -t g3wsuite/g3w-suite-deps:latest --no-cache .
it starts and after some time I get the error like:
.....
Get:374 http://archive.ubuntu.com/ubuntu bionic/universe amd64 wait-for-it all 0.0~git20170723-1 [4340 B]
Fetched 131 MB in 7min 15s (302 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/libpython3.6-dev_3.6.9-1~18.04ubuntu1.1_amd64.deb Connection failed [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get update && apt install -y libxml2-dev libxslt-dev postgresql-server-dev-all libgdal-dev python3-dev libgdal20 python3-gdal python3-pip curl wget vim wait-for-it gdal-bin libsqlite3-mod-spatialite dirmngr xvfb' returned a non-zero code: 100

Еrror on nginix: 502 Bad Gateway!!! what am I missing?

Hello,
I try to install G3W docker again and whatever attempts I make it always leads to an error I always get an error on nginix: 502 Bad Gateway
I use Ubuntu Server 18.04.5 (hostname: g3w-suite.demo) with SSH installed on it, git version 2.17.1, Docker version 19.03.12

Here are the commands I use to install g3w-suite:

cd home
git clone https://github.com/g3w-suite/g3w-suite-docker.git --branch v3.0.x
cd g3w-suite-docker
docker build -f Dockerfile.g3wsuite-deps.ltr.dockerfile -t g3wsuite/g3w-suite-deps:latest --no-cache .
docker build -f Dockerfile.g3wsuite.dockerfile -t g3wsuite/g3w-suite-dev:latest --no-cache .
docker-compose up -d

The changes I make to .env are as follows

image

As well as the lines in: /config/nginx/django.conf

server g3w-suite.demo:8000;

server_name g3w-suite.demo;

Can you advise me when I mess with installation ???

Setting Layer Opacity and Layer Reordiring

I expected option to change layer opacity and layer reordering by right button click on the layer name in layer the tree, and did not find it.
Is there a way to set layer opacity and re-order layer in the map?

Provide some alternative hints about the `tmp` folder

Currently within the env.example file is reported the following statement:

# Shared volume mount (docker internal: shared-volume)
# I suggest not to use the /tmp/ folder, /tmp/ folder is cleaned at each reboot
WEBGIS_DOCKER_SHARED_VOLUME=/tmp/shared-volume-g3wsuite-dev

in addition to that it would also be better to indicate some examples of folders recommended or quite common for you (then everyone is free to use what they want, but at least we have a common starting point).

Have a nice day,
Raruto

Qgs Upload Error

I keep Getting this error when trying to upload a project, I am using qgis 3.16.3 and am not sure what I am missing.

[Project error on layers()]-- [Layer error on layerType(_6583ab07_d566_4c92_b52a_0e2626c93958)]-- 'NoneType' object has no attribute 'name'

(All layers are "postgis" layers on the cloud)

How to upgrade from 3.3 to 3.4

When upgrading to 3.4 version I did try to copy and reuse the same postgis DB (volume) from 3.3 version

I get 500 error and in the log of the g3w-suite container I read:

django.db.utils.ProgrammingError: column qdjango_project.order does not exist

so the DB in 3.4 is different (more columns? more tables?), how to upgrade the DB from old 3.3 version?

Manage sensitive data with Docker secrets

As per v3.4, the following passwords are injected by the host as environment variables:


Ref: https://blog.diogomonica.com//2017/03/27/why-you-shouldnt-use-env-variables-for-secret-data/


When you store your secret keys in an environment variable, you are prone to accidentally exposing them—exactly what we want to avoid. Here are a few reasons why ENV variables are bad for secrets:

  • Given that the environment is implicitly available to the process, it's hard, if not impossible, to track access and how the contents get exposed (ps -eww <PID>).
  • It's common to have applications grab the whole environment and print it out for debugging or error reporting. So many secrets get leaked to PagerDuty that they have a well-greased internal process to scrub them from their infrastructure.
  • Environment variables are passed down to child processes, which allows for unintended access. This breaks the principle of least privilege. Imagine that as part of your application, you call to a third-party tool to perform some action—all of a sudden that third-party tool has access to your environment, and god knows what it will do with it.
  • When applications crash, it's common for them to store the environment variables in log-files for later debugging. This means plain-text secrets on disk.
  • Putting secrets in ENV variables quickly turns into tribal knowledge. New engineers who are not aware of the sensitive nature of specific environment variables will not handle them appropriately/with care (filtering them to sub-processes, etc).

Overall, secrets in ENV variables break the principle of least surprise, are a bad practice, and will lead to the eventual leak of secrets.


Ref: https://docs.docker.com/engine/swarm/secrets/#use-secrets-in-compose


This example creates a simple WordPress site using two secrets in a compose file:

  • the keyword secrets: defines two secrets db_password: and db_root_password:.
  • when deploying, Docker creates these two secrets and populates them with the content from the file specified in the compose file.
  • the db service uses both secrets, and the wordpress is using one.
  • when you deploy, Docker mounts a file under /run/secrets/<secret_name> in the services. These files are never persisted in disk, but are managed in memory.
  • each service uses environment variables to specify where the service should look for that secret data.

More information on short and long syntax for secrets can be found at Compose file version 3 reference.

version: "3.9"

services:
   db:
     image: mysql:latest
     volumes:
       - db_data:/var/lib/mysql
     environment:
       MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password   # <-- MYSQL_ROOT_PASSWORD
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD_FILE: /run/secrets/db_password             # <-- MYSQL_PASSWORD
     secrets:
       - db_root_password
       - db_password

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD_FILE: /run/secrets/db_password      # <-- WORDPRESS_DB_PASSWORD
     secrets:
       - db_password


secrets:
   db_password:
     file: db_password.txt
   db_root_password:
     file: db_root_password.txt

volumes:
    db_data:

Check `pg_service.conf` file or improve documentation about it

As per v3.4 it seems we are looking for a default service set but on a local ip: 192.168.1.137 (maybe an oversight? a lazy developer day?).

[water_service]
host=192.168.1.137
port=5432
dbname=gis_data
user=postgres
password=postgres

### PG_SERVICE
To use of PostgreSql Service, put your service setups into `./secrets/pg_service.conf file`,
the conf file will be mounted into docker container at runtime to PGSERVICEFILE path position.

# QGIS Server env variables
# ----------------------------------------------------
PGSERVICEFILE=/pg_service/pg_service.conf
# Put your pg service into ./scripts/pg_service.conf file, the conf file will be mounted into
# docker container at runtime a the PGSERVICEFILE

- ./secrets/pg_service.conf:${PGSERVICEFILE}


Ref: https://www.postgresql.org/docs/9.0/libpq-pgservice.html


The Connection Service File

The connection service file allows libpq connection parameters to be associated with a single service name. That service name can then be specified in a libpq connection string, and the associated settings will be used. This allows connection parameters to be modified without requiring a recompile of the libpq-using application. The service name can also be specified using the PGSERVICE environment variable.

Service names can be defined in either a per-user service file or a system-wide file. If the same service name exists in both the user and the system file, the user file takes precedence. By default, the per-user service file is named ~/.pg_service.conf. On Microsoft Windows, it is named %APPDATA%\postgresql\.pg_service.conf (where %APPDATA% refers to the Application Data subdirectory in the user's profile). A different file name can be specified by setting the environment variable PGSERVICEFILE. The system-wide file is named pg_service.conf. By default it is sought in the etc directory of the PostgreSQL installation (use pg_config --sysconfdir to identify this directory precisely). Another directory, but not a different file name, can be specified by setting the environment variable PGSYSCONFDIR.

Either service file uses an “INI file” format where the section name is the service name and the parameters are connection parameters; see Section 34.1.2 for a list. For example:

# comment
[mydb]
host=somehost
port=5433
user=admin

An example file is provided in the PostgreSQL installation at share/pg_service.conf.sample.

Connection parameters obtained from a service file are combined with parameters obtained from other sources. A service file setting overrides the corresponding environment variable, and in turn can be overridden by a value given directly in the connection string. For example, using the above service file, a connection string service=mydb port=5434 will use host somehost, port 5434, user admin, and other parameters as set by environment variables or built-in defaults.


Related to: #71

Escape special characthers within `.env.example`

Currently inside the .env file there is a special character #, which is quite common for passwords, but as you can see this assignment is misinterpreted by the docker environment (89#kL8y3D becomes 89):

G3WSUITE_POSTGRES_PASS=89#kL8y3D

photo

Nothing fatal, but it can get dramatic when trying to access psql without understanding why 😢

By chance do you know if there is a reference guide for escaping this weird characters? (eg. G3WSUITE_POSTGRES_PASS="89#kL8y3D" does not seem to be enough)

Unable to connect to SqlServer

it looks like the QODBC Driver is missing from current docker image:

QSqlDatabase: QODBC driver not loaded
QSqlDatabase: available drivers: QSQLITE QSPATIALITE

Add link and description to github repository

It is advisable to add a brief description that does not force others to open the project README to easily understand what this repository is about, for example:

Run G3W-SUITE stack with docker-compose

https://g3w-suite.readthedocs.io/en/latest/docker.html

photo

Share common `docker-compose.yml` configuration between various environments (production, development, maintenance)

By default, docker compose reads two files, a docker-compose.yml and an optional docker-compose.override.yml file.

By convention:

  • the docker-compose.yml contains your base configuration.
  • the docker-compose.override.yml contains configuration overrides for existing services or entirely new services.

A common use case for multiple files is changing a development Compose app for a production-like environment (which may be production, staging or CI). To support these differences, you can split your Compose configuration into a few different files

More info:


For example, here's how we could simplify the docker-compose-dev.yaml file:

docker compose \
  --file ../g3w-suite-docker/docker-compose.yml \
  --file ../g3w-suite-docker/docker-compose-dev.yml \
  ...
# ../g3w-suite-docker/docker-compose-dev.yml

version: "3"
services:

  postgis:
    restart: "no" # disable autorestart
    volumes:
      - g3wsuite-pg-data:/var/lib/postgresql
    networks:
      internal:
        aliases:
          - ${WEBGIS_PUBLIC_HOSTNAME}

  g3w-suite:
    environment:
      - BITBUCKET_TOKEN
      - G3WSUITE_QDJANGO_SERVER_URL
      - G3WSUITE_DEBUG
    ports:
      - "8000:8000"
    restart: "no" # disable autorestart
    volumes:
      - ./scripts:/scripts
    entrypoint: /scripts/docker-entrypoint-dev.sh

  nginx:
    deploy:
      replicas: 0  # disable nginx service

  certbot:
    deploy:
      replicas: 0  # disable certbot service

volumes:
  shared-volume:
  g3wsuite-pg-data:

networks:
  internal:
# ../g3w-suite-docker/docker-compose.yml

version: "3"
services:

  postgis:
    image: g3wsuite/postgis:11.0-2.5
    ports:
      - "5439:5432"
    environment:
      - POSTGRES_DBNAME=${G3WSUITE_POSTGRES_DBNAME},data_testing,data_production
      - POSTGRES_USER=${G3WSUITE_POSTGRES_USER_LOCAL}
      - POSTGRES_PASS=${G3WSUITE_POSTGRES_PASS}
      - ALLOW_IP_RANGE=0.0.0.0/0
    restart: on-failure
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"
    volumes:
      - ${WEBGIS_DOCKER_SHARED_VOLUME}:/var/lib/postgresql
    healthcheck:
      interval: 60s
      timeout: 30s
      retries: 3
      test: "pg_isready"
    networks:
      internal:

  g3w-suite:
    image: g3wsuite/g3w-suite:dev
    environment:
      - G3WSUITE_TILECACHE_PATH
      - G3WSUITE_POSTGRES_DBNAME
      - G3WSUITE_POSTGRES_USER
      - G3WSUITE_POSTGRES_USER_LOCAL
      - G3WSUITE_POSTGRES_PASS
      - G3WSUITE_POSTGRES_HOST
      - G3WSUITE_POSTGRES_PORT
      - G3WSUITE_ORS_API_ENDPOINT
      - G3WSUITE_ORS_API_KEY
      - TILESTACHE_CACHE_BUFFER_SIZE
      - TILESTACHE_CACHE_TOKEN
      - G3WSUITE_GUNICORN_NUM_WORKERS
      - G3WSUITE_GUNICORN_MAX_REQUESTS
      - G3WSUITE_GUNICORN_TIMEOUT
      - FRONTEND
      - PGSERVICEFILE
      - QGIS_SERVER_LOG_FILE
      - QGIS_SERVER_LOG_LEVEL
    expose:
      - "8000"
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"
    depends_on:
      - postgis
    volumes:
      - ${WEBGIS_DOCKER_SHARED_VOLUME}:/shared-volume
      - ${WEBGIS_DOCKER_SHARED_VOLUME}/node_modules:/code/node_modules
      - ./config/g3w-suite/overrides/templates:/code/templates:ro
      - ./config/g3w-suite/settings_docker.py:/code/g3w-admin/base/settings/local_settings.py
      - ./secrets/pg_service.conf:${PGSERVICEFILE}
    networks:
      internal:

  nginx:
    image: nginx
    ports:
      - "8080:8080"
      - "443:443"
    expose:
      - "8080"
    volumes:
      - ${WEBGIS_DOCKER_SHARED_VOLUME}:/shared-volume
      - ${WEBGIS_DOCKER_SHARED_VOLUME}/var/www/.well-known:/var/www/.well-known
      - ${WEBGIS_DOCKER_SHARED_VOLUME}/certs/letsencrypt:/etc/letsencrypt:ro
      - ./config/g3w-suite/overrides/static:/shared-volume/static/overrides:ro
      - ./config/nginx:/etc/nginx/conf.d:ro
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"
    restart: always
    networks:
      internal:

  # Letsencrypt certs
  certbot:
    image: certbot/certbot
    volumes:
      - ${WEBGIS_DOCKER_SHARED_VOLUME}/var/www/certbot:/var/www/certbot
      - ${WEBGIS_DOCKER_SHARED_VOLUME}/certs/letsencrypt:/etc/letsencrypt

volumes:
  shared-volume:
  g3wsuite-pg-data:

networks:
  internal:

NB Similarly for the following files there is no particular reason why they are separated:

How to backup/restore postgres database?

Currently the readme only explains how to log in as a postgres user, but how is it possible to dump the data? (ie. how to export a dump.sql file on host machine?)

This is what I found on stackoverflow:

backup psql:

docker exec -t g3w-suite-docker-postgis-1 pg_dumpall -c -U postgres > dump.sql

restore psql:

cat dump.sql | docker exec -i g3w-suite-docker-postgis-1 psql -U postgres

but I think it still needs a few minor tweaks to work: backup-restore-a-dockerized-postgresql-database

Error connection while show map

I have successfully installed G3W-Suite docker version on Ubuntu 18.04 and the application is fully functional in all parts except for the map view.
Viewing the map I get the connection error while testing the WMS capabilities indicates Server Error (500).

Save with only 1 click

The procedure for saving the modified layers involves saving a first time in the attribute insertion form and finally saving the changes made inside the layer again to send the changes to the DB (Postgresql in my case).
save1
Is it possible to provide for the data entered to be sent directly to the first save from the attribute entry form?
Save2

Make use of environment variables within nginx config

As per v3.4, some of these values must be updated manually within the following files:

  • /config/nginx/django.conf
  • /config/nginx/django_conf.ssl

For example:

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# NOTE: change server_name according to your real hostname
server_name dev.g3wsuite.it;

it might just be read from the .env file:

# Public hostmane
WEBGIS_PUBLIC_HOSTNAME=dev.g3wsuite.it

Doing so may also make it easier to set that variable for local development, eg:

WEBGIS_PUBLIC_HOSTNAME=localhost

More info:

g3w-suite/postgis error(?)

Hello! I tried to build and run g3w-suite with docker but g3w-suite/postgis seems to struggle to build.
From the logs i can see that postgres is constantly trying to re-connect but the following log appears: /docker-entrypoint.sh: line 52: kill: (12) - No such process
Screenshot from 2021-01-05 11-18-21

The steps i follow are:

  1. docker build -f Dockerfile.g3wsuite.dockerfile -t g3wsuite/g3w-suite:dev --no-cache .
  2. docker build -f Dockerfile.g3wsuite-deps.ltr.dockerfile -t g3wsuite/g3w-suite-deps-ltr:dev --no-cache .
  3. docker build -f Dockerfile.postgis.dockerfile -t g3wsuite/postgis:11.0-2.5 .
  4. docker-compose up -d

Server details:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

I also try to build the stack with the mdillon/postgis:latest image and it works perfectly :/
Am i missing something in the building proccess or this is a problem whith the g3w-suite/postgis image?
Thanks in advance!

Please explain how to "refresh" the code from github

Hello,

I am using the _dev version of g3wsuite in the docker.
When I restart the docker container, it doesn't update the code from github.
How can I "refresh" it? Can you write it in the documentation?

Thank you!

QGIS Server version

Problem

I am trying to set up this demo service and all work well with the default images. I, however, run into errors when I try to change the qgis-server images.

I tried the following and it doesn't startup

version: '2.2'
services:

 

  qgisserver:
    restart: unless-stopped
    image: 3liz/qgis-map-server:3.10
    #hostname: qgis-server
    container_name: qgisserver4${COMPOSE_PROJECT_NAME}
    environment:
      - QGSRV_SERVER_WORKERS=6
      - QGSRV_LOGGING_LEVEL=DEBUG
      - QGSRV_CACHE_ROOTDIR=/djangoassets/geodata
      - QGSRV_CACHE_SIZE=100
      - QGSRV_SERVER_TIMEOUT=300
    volumes_from:
      - django

  

The main problem is that this QGIS server runs on port 8080 inside docker and the URL for qgis server should not be hardcoded with the path ie &map=/djangoassets/geodata but it should be relative to the QGSRV_CACHE_ROOTDIR so the request should be like &map=test.qgis or
&map=/folder/test.qgis assuming folder is a directory inside /djangoassets/geodata

Otherwise thanks awesome work.

file style.css missing

The README.md states:

A custom CSS is added to the pages, the file is located in config/g3w-suite/overrides/static/style.css and can be modified directly, changes are effective immediately.

unfortunately the style.css file is missing from repo.

Docker Question

Sorry if this is the wrong place to ask but I'm new to learning docker and just wondering how or if its possible to use a cloud storage bucket as the persistent data storage. It looks to me like I would just need to set it up as an env variable but I am not exactly sure I understand docker well enough yet.... Any direction would be most appreciated.

Details Consumer image

Good morning,

is it possible to add some details (even at the documentation level) on the "consumer" image ?
What does batch processing refer to?

Thank you

Error in 3f198f0d4c79_g3wsuitedocker_postgis_1 Container

Hello I just starting with your project, g3w-suite-docker buid and install posgis, form branch v3.0.x OK , But when i start the containers with command "docker-compose up" ( to see the logs) without -d . And in console i saw this message from postgres.

Operating System is Ubuntu 18.04.5 LTS (bionic)

The message is:
/docker-entrypoint.sh: line 52: kill: (12) - No such process
3f198f0d4c79_g3wsuitedocker_postgis_1 | Setup master database
3f198f0d4c79_g3wsuitedocker_postgis_1 | psql: could not connect to server: Connection refused
3f198f0d4c79_g3wsuitedocker_postgis_1 | Is the server running locally and accepting
3f198f0d4c79_g3wsuitedocker_postgis_1 | connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:50.212 UTC [12] LOG: listening on IPv4 address "127.0.0.1", port 5432
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:50.305 UTC [12] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:50.679 UTC [24] LOG: database system was interrupted; last known up at 2020-08-26 13:07:46 UTC
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.038 UTC [24] LOG: database system was not properly shut down; automatic recovery in progress
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.100 UTC [24] LOG: redo starts at 0/30F7850
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.100 UTC [24] LOG: invalid record length at 0/30F8060: wanted 24, got 0
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.100 UTC [24] LOG: redo done at 0/30F7FF0
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.100 UTC [24] LOG: last completed transaction was at log time 2020-08-26 13:07:47.63654+00
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.196 UTC [35] postgres@postgres FATAL: the database system is starting up
3f198f0d4c79_g3wsuitedocker_postgis_1 | psql: FATAL: the database system is starting up
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.540 UTC [12] LOG: database system is ready to accept connections
3f198f0d4c79_g3wsuitedocker_postgis_1 | 2020-08-26 13:08:51.547 UTC [42] LOG: pg_cron scheduler started
3f198f0d4c79_g3wsuitedocker_postgis_1 | List of databases
3f198f0d4c79_g3wsuitedocker_postgis_1 | Name | Owner | Encoding | Collate | Ctype | Access privileges
3f198f0d4c79_g3wsuitedocker_postgis_1 | -----------------+----------+-----------+---------+-------+-----------------------
3f198f0d4c79_g3wsuitedocker_postgis_1 | data_production | g3wsuite | SQL_ASCII | C | C |
3f198f0d4c79_g3wsuitedocker_postgis_1 | data_testing | postgres | SQL_ASCII | C | C |
3f198f0d4c79_g3wsuitedocker_postgis_1 | g3wsuite | g3wsuite | SQL_ASCII | C | C |
3f198f0d4c79_g3wsuitedocker_postgis_1 | postgres | postgres | SQL_ASCII | C | C |
3f198f0d4c79_g3wsuitedocker_postgis_1 | template0 | postgres | SQL_ASCII | C | C | =c/postgres +
3f198f0d4c79_g3wsuitedocker_postgis_1 | | | | | | postgres=CTc/postgres
3f198f0d4c79_g3wsuitedocker_postgis_1 | template1 | postgres | SQL_ASCII | C | C | =c/postgres +
3f198f0d4c79_g3wsuitedocker_postgis_1 | | | | | | postgres=CTc/postgres
3f198f0d4c79_g3wsuitedocker_postgis_1 | (6 rows)
3f198f0d4c79_g3wsuitedocker_postgis_1 |
3f198f0d4c79_g3wsuitedocker_postgis_1 | postgres ready
3f198f0d4c79_g3wsuitedocker_postgis_1 | Setup postgres User:Password
3f198f0d4c79_g3wsuitedocker_postgis_1 | Creating superuser postgres
3f198f0d4c79_g3wsuitedocker_postgis_1 | ALTER ROLE
3f198f0d4c79_g3wsuitedocker_postgis_1 | Creating replication user replicator
3f198f0d4c79_g3wsuitedocker_postgis_1 | ALTER ROLE
3f198f0d4c79_g3wsuitedocker_postgis_1 | datname | datdba | encoding | datcollate | datctype | datistemplate | datallowconn | datconnlimit | datlastsysoid | datfrozenxid | datminmxid | dattablespace | datacl

Add some info about Gunicorn

As per v3.4, this is what is currently reported in the /scripts/docker-entrypoint.sh file::

gunicorn base.wsgi:application \
--limit-request-fields 0 \
--error-logfile - \
--log-level=debug \
--timeout ${G3WSUITE_GUNICORN_TIMEOUT:-120} \
--workers=${G3WSUITE_GUNICORN_NUM_WORKERS:-8} \
--max-requests=${G3WSUITE_GUNICORN_MAX_REQUESTS:-200} \
-b 0.0.0.0:8000

But currently the README.md file reports this stack without any other mention of gunicorn:

stack

This is what we can currently find in the documentation:

Fix for FATAL: role "root" does not exist

If you don’t specify the PGUSER environment variable, then psql will assume you want to use the current OS user as your database user name. In this case, you are using root as your OS user, and you will attempt to log in as root, but that user doesn’t exist in the database.

Source: https://stackoverflow.com/questions/60193781/postgres-with-docker-compose-gives-fatal-role-root-does-not-exist-error


This warning does not really generate a fatal error, but it is still a pretty nasty notification because it clogs the service logs:

2022-06-14 15:28:00.342 UTC [199] root@root FATAL:  role "root" does not exist
2022-06-14 15:29:00.841 UTC [221] root@root FATAL:  role "root" does not exist
2022-06-14 15:30:01.195 UTC [238] root@root FATAL:  role "root" does not exist
2022-06-14 15:31:01.467 UTC [255] root@root FATAL:  role "root" does not exist
2022-06-14 15:32:01.798 UTC [276] root@root FATAL:  role "root" does not exist
2022-06-14 15:33:02.205 UTC [295] root@root FATAL:  role "root" does not exist
2022-06-14 15:34:02.652 UTC [312] root@root FATAL:  role "root" does not exist
2022-06-14 15:35:03.170 UTC [327] root@root FATAL:  role "root" does not exist
2022-06-14 15:36:03.488 UTC [360] root@root FATAL:  role "root" does not exist
2022-06-14 15:37:03.916 UTC [388] root@root FATAL:  role "root" does not exist
2022-06-14 15:38:04.379 UTC [406] root@root FATAL:  role "root" does not exist
2022-06-14 15:39:04.716 UTC [417] root@root FATAL:  role "root" does not exist
2022-06-14 15:40:05.032 UTC [426] root@root FATAL:  role "root" does not exist
2022-06-14 15:41:05.345 UTC [435] root@root FATAL:  role "root" does not exist
2022-06-14 15:42:05.782 UTC [444] root@root FATAL:  role "root" does not exist
2022-06-14 15:43:06.164 UTC [455] root@root FATAL:  role "root" does not exist
2022-06-14 15:44:06.471 UTC [465] root@root FATAL:  role "root" does not exist
2022-06-14 15:45:06.728 UTC [476] root@root FATAL:  role "root" does not exist
2022-06-14 15:46:07.021 UTC [485] root@root FATAL:  role "root" does not exist
2022-06-14 15:47:07.197 UTC [495] root@root FATAL:  role "root" does not exist
2022-06-14 15:48:07.486 UTC [504] root@root FATAL:  role "root" does not exist
2022-06-14 15:49:07.687 UTC [513] root@root FATAL:  role "root" does not exist
2022-06-14 15:50:07.995 UTC [522] root@root FATAL:  role "root" does not exist
2022-06-14 15:51:08.338 UTC [531] root@root FATAL:  role "root" does not exist
2022-06-14 15:52:08.603 UTC [540] root@root FATAL:  role "root" does not exist
2022-06-14 15:53:08.792 UTC [549] root@root FATAL:  role "root" does not exist
2022-06-14 15:54:09.059 UTC [559] root@root FATAL:  role "root" does not exist
2022-06-14 15:55:09.338 UTC [568] root@root FATAL:  role "root" does not exist
2022-06-14 15:56:09.615 UTC [578] root@root FATAL:  role "root" does not exist
2022-06-14 15:57:09.805 UTC [587] root@root FATAL:  role "root" does not exist
2022-06-14 15:58:10.098 UTC [597] root@root FATAL:  role "root" does not exist
2022-06-14 15:59:10.388 UTC [606] root@root FATAL:  role "root" does not exist
2022-06-14 16:00:10.789 UTC [615] root@root FATAL:  role "root" does not exist
2022-06-14 16:01:11.041 UTC [624] root@root FATAL:  role "root" does not exist
2022-06-14 16:02:11.363 UTC [633] root@root FATAL:  role "root" does not exist
2022-06-14 16:03:11.636 UTC [642] root@root FATAL:  role "root" does not exist
2022-06-14 16:04:12.032 UTC [651] root@root FATAL:  role "root" does not exist
2022-06-14 16:05:12.229 UTC [660] root@root FATAL:  role "root" does not exist
2022-06-14 16:06:12.467 UTC [669] root@root FATAL:  role "root" does not exist
2022-06-14 16:07:12.719 UTC [678] root@root FATAL:  role "root" does not exist
2022-06-14 16:08:12.997 UTC [687] root@root FATAL:  role "root" does not exist
2022-06-14 16:09:13.225 UTC [696] root@root FATAL:  role "root" does not exist
2022-06-14 16:10:13.436 UTC [706] root@root FATAL:  role "root" does not exist
2022-06-14 16:11:13.766 UTC [716] root@root FATAL:  role "root" does not exist
2022-06-14 16:12:14.050 UTC [725] root@root FATAL:  role "root" does not exist
2022-06-14 16:13:14.296 UTC [734] root@root FATAL:  role "root" does not exist
2022-06-14 16:14:14.465 UTC [743] root@root FATAL:  role "root" does not exist
2022-06-14 16:15:14.730 UTC [752] root@root FATAL:  role "root" does not exist
2022-06-14 16:16:14.938 UTC [761] root@root FATAL:  role "root" does not exist
2022-06-14 16:17:15.193 UTC [770] root@root FATAL:  role "root" does not exist
2022-06-14 16:18:15.511 UTC [780] root@root FATAL:  role "root" does not exist
2022-06-14 16:19:15.739 UTC [789] root@root FATAL:  role "root" does not exist
2022-06-14 16:20:15.938 UTC [799] root@root FATAL:  role "root" does not exist
2022-06-14 16:21:16.189 UTC [808] root@root FATAL:  role "root" does not exist
2022-06-14 16:22:16.400 UTC [817] root@root FATAL:  role "root" does not exist
2022-06-14 16:23:16.619 UTC [826] root@root FATAL:  role "root" does not exist
2022-06-14 16:24:16.917 UTC [835] root@root FATAL:  role "root" does not exist
2022-06-14 16:25:17.251 UTC [844] root@root FATAL:  role "root" does not exist
2022-06-14 16:26:17.517 UTC [853] root@root FATAL:  role "root" does not exist
2022-06-14 16:27:17.757 UTC [862] root@root FATAL:  role "root" does not exist
2022-06-14 16:28:18.056 UTC [871] root@root FATAL:  role "root" does not exist
2022-06-14 16:29:18.300 UTC [881] root@root FATAL:  role "root" does not exist
2022-06-14 16:30:18.572 UTC [890] root@root FATAL:  role "root" does not exist
2022-06-14 16:31:18.846 UTC [899] root@root FATAL:  role "root" does not exist
2022-06-14 16:32:19.122 UTC [908] root@root FATAL:  role "root" does not exist
2022-06-14 16:33:19.371 UTC [917] root@root FATAL:  role "root" does not exist
2022-06-14 16:34:19.637 UTC [926] root@root FATAL:  role "root" does not exist
2022-06-14 16:35:19.927 UTC [936] root@root FATAL:  role "root" does not exist
2022-06-14 16:36:20.179 UTC [945] root@root FATAL:  role "root" does not exist
2022-06-14 16:37:20.499 UTC [954] root@root FATAL:  role "root" does not exist
2022-06-14 16:38:20.799 UTC [964] root@root FATAL:  role "root" does not exist
2022-06-14 16:39:21.050 UTC [973] root@root FATAL:  role "root" does not exist
2022-06-14 16:40:21.306 UTC [982] root@root FATAL:  role "root" does not exist
2022-06-14 16:41:21.574 UTC [991] root@root FATAL:  role "root" does not exist
2022-06-14 16:42:21.944 UTC [1000] root@root FATAL:  role "root" does not exist
2022-06-14 16:43:22.256 UTC [1009] root@root FATAL:  role "root" does not exist
2022-06-14 16:44:22.521 UTC [1018] root@root FATAL:  role "root" does not exist
2022-06-14 16:45:22.723 UTC [1028] root@root FATAL:  role "root" does not exist
2022-06-14 16:46:22.984 UTC [1037] root@root FATAL:  role "root" does not exist
2022-06-14 16:47:23.196 UTC [1046] root@root FATAL:  role "root" does not exist
2022-06-14 16:48:23.368 UTC [1056] root@root FATAL:  role "root" does not exist
2022-06-14 16:49:23.540 UTC [1065] root@root FATAL:  role "root" does not exist
2022-06-14 16:50:23.824 UTC [1074] root@root FATAL:  role "root" does not exist
2022-06-14 16:51:24.104 UTC [1083] root@root FATAL:  role "root" does not exist
2022-06-14 16:52:24.365 UTC [1092] root@root FATAL:  role "root" does not exist
2022-06-14 16:53:24.577 UTC [1101] root@root FATAL:  role "root" does not exist
2022-06-14 16:54:24.765 UTC [1110] root@root FATAL:  role "root" does not exist
2022-06-14 16:55:24.975 UTC [1119] root@root FATAL:  role "root" does not exist
2022-06-14 16:56:25.162 UTC [1128] root@root FATAL:  role "root" does not exist
2022-06-14 16:57:25.387 UTC [1137] root@root FATAL:  role "root" does not exist
2022-06-14 16:58:25.704 UTC [1146] root@root FATAL:  role "root" does not exist
2022-06-14 16:59:25.965 UTC [1155] root@root FATAL:  role "root" does not exist
2022-06-14 17:00:26.250 UTC [1164] root@root FATAL:  role "root" does not exist
2022-06-14 17:01:26.507 UTC [1173] root@root FATAL:  role "root" does not exist
2022-06-14 17:02:26.814 UTC [1183] root@root FATAL:  role "root" does not exist
2022-06-14 17:03:27.208 UTC [1192] root@root FATAL:  role "root" does not exist
2022-06-14 17:04:27.407 UTC [1201] root@root FATAL:  role "root" does not exist
2022-06-14 17:05:27.607 UTC [1210] root@root FATAL:  role "root" does not exist
2022-06-14 17:06:27.874 UTC [1219] root@root FATAL:  role "root" does not exist
2022-06-14 17:07:28.077 UTC [1229] root@root FATAL:  role "root" does not exist
2022-06-14 17:08:28.332 UTC [1238] root@root FATAL:  role "root" does not exist
2022-06-14 17:09:28.588 UTC [1247] root@root FATAL:  role "root" does not exist
2022-06-15 06:06:32.980 UTC [1256] root@root FATAL:  role "root" does not exist
2022-06-15 06:07:33.341 UTC [1266] root@root FATAL:  role "root" does not exist
2022-06-15 06:08:33.855 UTC [1276] root@root FATAL:  role "root" does not exist
2022-06-15 06:09:34.353 UTC [1297] root@root FATAL:  role "root" does not exist
2022-06-15 06:10:34.629 UTC [1308] root@root FATAL:  role "root" does not exist
2022-06-15 06:11:34.938 UTC [1317] root@root FATAL:  role "root" does not exist

Have a nice day,
Raruto

Syntax error: /scripts/setup.sh:

When I trying to install through the docker gis3w by executing the command "docker build -f Dockerfile.g3wsuite.dockerfile -t g3wsuite/g3w-suite:dev --no-cache ." I am receiving the following error message as shown in the images
issue1

issue2

problem with named volume in docker-compose.yml

Version 3.2.x

if I use the internal docker volume, as suggested in the .env file:

# Shared volume mount (docker internal: shared-volume)
WEBGIS_DOCKER_SHARED_VOLUME=shared-volume 

I cannot build the suite because the following error:

docker-compose up -d
ERROR: Named volume "shared-volume/node_modules:/code/node_modules:rw" is used in service "g3w-suite" but no declaration was found in the volumes section.

I suspect that you cannot specify subfolders in named volumes, like shared-volume/node_modules:something_else
but only: shared-volume:something_else
Can you confirm?

(complimenti per il lavoro eccezionale!)

Allow `config/g3w-suite/overrides/static` usage while developing

As per v3.4 it is only possible to override templates (ref: #58):

- ./config/g3w-suite/overrides/templates:/code/templates:ro

during development it would also be handy to allow overriding of static files, as it already happens for the docker-compose.yml file:

- ./config/g3w-suite/overrides/static:/shared-volume/static/overrides:ro

Standalone QGIS Server container

It seems the g3wsuite/g3w-suite:dev image installs the native QGIS Server within the image. This is against the principle of docker where containers should be self-contained.

What was the motivation for this because we can no longer scale the QGIS Server in production environments? Is there a way to use a standalone QGIS Server container with the stack

QT Plugin 'offscreen'

Into run docker-compose up, on 'collectstatic' commands:
This application failed to start because it could not find or load the Qt platform plugin ""offscreen""

Issue with print layout

Hello,
I have published a qgis projects with g3w-suite-docker. The project has a print layout. After publishing to the g3w suite, I see the map with all the layers as well as layer editing tools, But I do not see print options for the print layout. I am not sure what steps I have missed.
Thanks.

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.