Docker installation not allow

I got this when i try to build

docker-compose build
(root) Additional property app is not allowed

Docker compose file was not modify at all

hi Forces,

#if in ubuntu 20.04 just try
sudo docker-compose build
#and wait until all files done.

#and then make change the docker-compose.yml :
#=======================================
db:
build: db
restart: always
volumes:
- ./volumes/db/data:/var/lib/postgresql/data
- ./volumes/db/log:/var/log/postgresql
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- METASFRESH_USERNAME=metasfresh
- METASFRESH_PASSWORD=metasfresh
- METASFRESH_DBNAME=metasfresh
- DB_SYSPASS=System
- POSTGRES_PASSWORD=ip2LmNzXX8p8iXg9lZTWEJ9524kQDbXFudB7LR03T-xK9fLweX3TLMkA2AYcEiaS
app:
build: app
hostname: app
links:
- db:db
- rabbitmq:rabbitmq
- search:search
expose:
- “8282”
- “61616”
- “8788”
restart: always
volumes:
- ./volumes/app/log:/opt/metasfresh/log:rw
- ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- METASFRESH_HOME=/opt/metasfresh
webapi:
build: webapi
links:
- app:app
- db:db
- rabbitmq:rabbitmq
- search:search
expose:
- “8789”
#to access the webui-api directly
#(eg. for debugging or connecting your app to the metasfresh api)
#uncomment following port:
ports:
- “8181:8080”
restart: always
volumes:
- ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
- ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
webui:
build: webui
links:
- webapi:webapi
ports:
- “8080:80”
- “443:443”
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
##uncomment and set to URL where metasfresh will be available from browsers
environment:
- WEBAPI_URL=http://localhost:8080
rabbitmq:
build: rabbitmq
expose:
- “5672”
restart: always
volumes:
- ./volumes/rabbitmq/log:/var/log/rabbitmq/log
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
RABBITMQ_DEFAULT_USER: “metasfresh”
RABBITMQ_DEFAULT_PASS: “metasfresh”
RABBITMQ_DEFAULT_VHOST: “/”
search:
build: search
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
#to access the search api directly
#(e.g. if you did docker-compose up search to have the deachboard with your locally running metasfresh services)
#uncomment following ports:
ports:
- “9200:9200”
- “9300:9300”
volumes:
- ./volumes/search/data:/usr/share/elasticsearch/data
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- “ES_JAVA_OPTS=-Xms512M -Xmx1024M”
restart: always
#=======================================

#then to start docker :
sudo docker-compose up -d
#showing the log :
docker-compose logs -f -t
#if some error message : #handle Origin header value ‘http://localhost:8080’ not allowed, execute this in terminal
sudo docker exec -u postgres metasfresh-docker_db_1 psql -d metasfresh -c “UPDATE AD_SysConfig SET Value=‘http://localhost:8080’ WHERE Name=‘webui.frontend.url’;”

#hope will solve your problem.

Tried with sudo and with root, still cannot build
(root) Additional property app is not allowed

I had to change the whole docker-compose.yml to have a services: at the top and indent all the rest of the file:

services:
db:
build: db
restart: always
volumes:
- ‘./volumes/db/data:/var/lib/postgresql/data’
- ‘./volumes/db/log:/var/log/postgresql’
- ‘/etc/localtime:/etc/localtime:ro’
- ‘/etc/timezone:/etc/timezone:ro’
environment:
- METASFRESH_USERNAME=metasfresh
- METASFRESH_PASSWORD=metasfresh
- METASFRESH_DBNAME=metasfresh
- DB_SYSPASS=System
- >-
POSTGRES_PASSWORD=ip2LmNzXX8p8iXg9lZTWEJ9524kQDbXFudB7LR03T-xK9fLweX3TLMkA2AYcEiaS
app:
build: app
hostname: app
links:
- ‘db:db’
- ‘rabbitmq:rabbitmq’
- ‘search:search’
expose:
- ‘8282’
- ‘61616’
- ‘8788’
restart: always
volumes:
- ‘./volumes/app/log:/opt/metasfresh/log:rw’
- ‘./volumes/app/heapdump:/opt/metasfresh/heapdump:rw’
- ‘/etc/localtime:/etc/localtime:ro’
- ‘/etc/timezone:/etc/timezone:ro’
environment:
- METASFRESH_HOME=/opt/metasfresh
webapi:
build: webapi
links:
- ‘app:app’
- ‘db:db’
- ‘rabbitmq:rabbitmq’
- ‘search:search’
ports:
- ‘8080:8080’
expose:
- ‘8789’
restart: always
volumes:
- ‘./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw’
- ‘./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw’
- ‘/etc/localtime:/etc/localtime:ro’
- ‘/etc/timezone:/etc/timezone:ro’
webui:
build: webui
links:
- ‘webapi:webapi’
ports:
- ‘80:80’
- ‘443:443’
restart: always
volumes:
- ‘/etc/localtime:/etc/localtime:ro’
- ‘/etc/timezone:/etc/timezone:ro’
environment:
- WEBAPI_URL=http://127.0.0.1:80
rabbitmq:
build: rabbitmq
expose:
- ‘5672’
restart: always
volumes:
- ‘./volumes/rabbitmq/log:/var/log/rabbitmq/log’
- ‘/etc/localtime:/etc/localtime:ro’
- ‘/etc/timezone:/etc/timezone:ro’
environment:
RABBITMQ_DEFAULT_USER: metasfresh
RABBITMQ_DEFAULT_PASS: metasfresh
RABBITMQ_DEFAULT_VHOST: /
search:
build: search
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- ‘./volumes/search/data:/usr/share/elasticsearch/data’
- ‘/etc/localtime:/etc/localtime:ro’
- ‘/etc/timezone:/etc/timezone:ro’
environment:
- ES_JAVA_OPTS=-Xms128M -Xmx256m
restart: always

Also noteworthy: don’t check out on windows with autocrlf=true . This changes some files and then 3 of the services keep “restarting” state. You can check that with:

docker-compose ps

And be patient with the webapi service. If you see a login mask with filled button (just a green line) then probably the webapi is not yet ready. Really takes a minute. You can check by

docker-compose logs webapi

As long as there are no entries the webapi is not ready yet. Or you can type in the browser url:

http://127.0.0.1/rest/api/login/availableLanguages

As long as the response is empty the webapi is not ready yet.

Also remember to call h ttp://127.0.0.1/login and not localhost or only h ttp://127.0.0.1/

Took me 4 hours to get that thing working.