docker-compose interpreter error - Java Exception

Answered

Trying to create a remote docker-compose interpreter is resulting in the exception:

Can  not deserialize instance of java.lang.String out of START_OBJECT 
token at [Source: N/A; line: -1, column: -1] (through reference chain:
com.intellij.docker.compose.configuration.beans.v2.DockerComposeConfigurationV2["services"]->java.util.LinkedHashMap["<project name>"]->com.intellij.docker.compose.configuration.beans.v2.DockerComposeServiceV2["volumes"]->java.util.ArrayList[0])

The exception is happening with version 2018.1.1 on OSX El Capitan. Any ideas?

I checked the issue tracker, and my docker-compose file has no depends_on statements.

5 comments
Comment actions Permalink

Hi,

What syntax do you use to describe volumes in your docker-compose configuration file? PyCharm supports the short syntax and it does not yet support the extended syntax with individual type, source, target and volume properties unfortunately.

1
Comment actions Permalink

Thank-you very much for that detail! We are using the type, source, and target on the volumes. I will look into the short syntax for my own development.

Where might there current capabilities of PyCharm <-> Docker-Compose be listed so that I can avoid other syntax not currently supported?

0
Comment actions Permalink

What's the answer to this question?

0
Comment actions Permalink

Similar error, but mine is on the PORT of my NGINX Service definition

here is my docker-compose file

 
---
version: '3.7'
services:
nginx:
build:
context: ./
dockerfile: Dockerfile.nginx
image: defectdojo/defectdojo-nginx:${NGINX_VERSION:-latest}
depends_on:
- uwsgi
ports:
- target: 8080
published: ${DD_PORT:-8080}
protocol: tcp
mode: host
uwsgi:
build:
context: ./
dockerfile: Dockerfile.django
image: defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}
depends_on:
- mysql
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '-t', '30', '--', '/entrypoint-uwsgi.sh']
environment:
DD_DEBUG: 'off'
DD_ALLOWED_HOSTS: ${DD_ALLOWED_HOSTS:-*}
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_CELERY_BROKER_USER: ${DD_CELERY_BROKER_USER:-guest}
DD_CELERY_BROKER_PASSWORD: ${DD_CELERY_BROKER_USER:-guest}
celerybeat:
image: defectdojo/defectdojo-django:latest
depends_on:
- mysql
- rabbitmq
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '-t', '30', '--', '/entrypoint-celery-beat.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_CELERY_BROKER_USER: ${DD_CELERY_BROKER_USER:-guest}
DD_CELERY_BROKER_PASSWORD: ${DD_CELERY_BROKER_USER:-guest}
celeryworker:
image: defectdojo/defectdojo-django:latest
depends_on:
- mysql
- rabbitmq
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '-t', '30', '--', '/entrypoint-celery-worker.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_CELERY_BROKER_USER: ${DD_CELERY_BROKER_USER:-guest}
DD_CELERY_BROKER_PASSWORD: ${DD_CELERY_BROKER_USER:-guest}
initializer:
image: defectdojo/defectdojo-django:latest
depends_on:
- mysql
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '--', '/entrypoint-initializer.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_ADMIN_USER: ${DD_ADMIN_USER:-admin}
DD_ADMIN_MAIL: ${DD_ADMIN_USER:-admin@defectdojo.local}
DD_ADMIN_FIRST_NAME: ${DD_ADMIN_FIRST_NAME:-Admin}
DD_ADMIN_LAST_NAME: ${DD_ADMIN_LAST_NAME:-User}
DD_INITIALIZE: ${DD_INITIALIZE:-true}
mysql:
image: mysql:latest
security_opt:
- seccomp:unconfined
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
MYSQL_USER: ${DD_DATABASE_USER:-defectdojo}
MYSQL_PASSWORD: ${DD_DATABASE_PASSWORD:-defectdojo}
MYSQL_DATABASE: ${DD_DATABASE_NAME:-defectdojo}
command: ['mysqld', '--default-authentication-plugin=mysql_native_password', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
volumes:
- defectdojo_data:/var/lib/mysql
rabbitmq:
image: rabbitmq:3.7
volumes:
defectdojo_data: {}
0
Comment actions Permalink

Meh.... just found on the link that @Alexander Koshevoy that the "TARGET" is supposed to be a LONG SYNTAX... now I wonder when would IntelliJ / PyCharm support long docker-compose syntax....

0

Please sign in to leave a comment.