g3w-suite/g3w-suite-docker

[Docker Desktop] Error decoding 'Volumes[0] invalid spec: :/shared-volume: empty section between colons

pravesh-kasare opened this issue ยท 7 comments

Checklist

  • I've searched through the existing issues and this bug has never been reported before

Subject of the issue

Hi,
recently i tried to configure G3W suite on my windows using docker desktop. G3W admin and client environment were created successfully, but while adding G3W docker suite got the below volume 0 invalid spec error.
i have followed each step suggested in documentation.
#help #docker_desktop

error decoding 'Volumes[0] invalid spec: :/shared-volume: empty section between colons

Screenshot 2023-07-12 155055

Steps to reproduce

Screenshot 2023-07-12 155055

Environment

  • g3w-admin: 3.6
  • g3w-client:3.8.5
  • browser: edge
  • operating system: Windows 11

Link to your project

No response

Additional info

No response

Raruto commented

Hi @pravesh-kasare,

from the little I can see, it looks like you are trying to create a dev environment through the Docker Desktop GUI's.

We have no previous experience with them, but that error may be due to the fact that the .env file (ref: missing WEBGIS_DOCKER_SHARED_VOLUME variable) is not being automatically loaded in here:

volumes:
- ${WEBGIS_DOCKER_SHARED_VOLUME}:/shared-volume
- ${WEBGIS_DOCKER_SHARED_VOLUME}/node_modules:/code/node_modules

Please note that the steps to create the development docker container are currently located in here:

# G3W-SUITE-DOCKER FOR DEVELOPMENT
Follow instructions are for development environment.
1. Copy `.env.example` file into `.env` and edit it:
* set `WEBGIS_DOCKER_SHARED_VOLUME` to a specific folder for permanent volume data;
* set `G3WSUITE_DEBUG` to `True`;
* set `G3WSUITE_LOCAL_CODE_PATH` with path to your local G3W-SUITE code location.
2. Run `docker compose -f docker-compose-dev.yml up -d`.
1. If all went well G3W-SUITE is running in development mode on http://127.0.0.1:8000

Anyway, I suggest you to directly follow g3w-client's dev instructions (which right now are a litte bit more detailed / updated) if you intend to develop something for g3w-suite using a docker container.

๐Ÿ‘‹ Raruto

i have had added shared volume in .env file and follwed the steps as mentioned in g3w docker suite but the same error displaying

Screenshot 2023-07-14 114015

Raruto commented

@pravesh-kasare Docker Desktop Dev Environments (beta) are an undocumented / unsupported method to install g3w-suite..

i have had added shared volume in .env file

Then to create development container (first time only) you need to run the following command within a Windows Terminal (powershell or command prompt):

cd path/to/your/workspace/g3w-suite-docker/

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

And after that, once it's done, in Docker Desktop you should see something like the following within the Containers tab:

image

# G3W-SUITE-DOCKER FOR DEVELOPMENT
Follow instructions are for development environment.
1. Copy `.env.example` file into `.env` and edit it:
* set `WEBGIS_DOCKER_SHARED_VOLUME` to a specific folder for permanent volume data;
* set `G3WSUITE_DEBUG` to `True`;
* set `G3WSUITE_LOCAL_CODE_PATH` with path to your local G3W-SUITE code location.
2. Run `docker compose -f docker-compose-dev.yml up -d`.
1. If all went well G3W-SUITE is running in development mode on http://127.0.0.1:8000

๐Ÿ‘‹ Raruto

loading project: volumes must be a mapping
don't know where things went wrong...
Screenshot 2023-07-14 165223

can you please check it on my laptop remotely.

Raruto commented

loading project: volumes must be a mapping
don't know where things went wrong...

I'll be pedantic, as per g3w-suite@v3.6 the necessary steps to follow to start working via docker are detailed here and here (ie. projects structure, configuration files and other commands to be used from the terminal), other installation methods are not currently supported.

From what little you show, it seems that you are trying to use a your own customized version of the docker-compose-dev.yml file (and not the default one provided in here).

If not, please create a new issue and provide as much detail as possible in your first comment to allow anyone else trying to understand what you are trying to do (NB: reporting to others your steps-by-step is crucial to understanding what is going wrong).

can you please check it on my laptop remotely.

In this regard, sales department is available at info@gis3w.it for dedicated assistance or installations.

๐Ÿ‘‹ Raruto