Coder Social home page Coder Social logo

Comments (13)

TESAARON avatar TESAARON commented on August 24, 2024 1

Many thanks Martin. I will try this and let you know how it goes.

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

Have you managed to check the logs? This is the behavior the Portal exposes if the Portal API does not manage to start (for some reason). Usually, the API will tell you exactly what's wrong, and I suspect it's lacking one or more environment variables.

If you do a docker-compose up without the -d parameter, compose will output the logs to stdout, and as compose tries to restart stopped containers, you will repeatedly see the wicked.portal-api container failing (supposedly), stating each time why it fails.

Please report what your issue was so that I can amend the documentation.

/Martin

from wicked.haufe.io.

TESAARON avatar TESAARON commented on August 24, 2024

Hi Martin,

I am including here the error log when I run docker-compose up.

error_log_file.txt

It seems to be logging errors on the environment variables that I have set in the localhost environment. I also attach a screenshot of the environment variables that I configured in kickstarter for the localhost.

capture

Let me know what you think.

Aaron

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

The API says it can't find the localhost.json file. Try to tear down the entire environment using docker-compose down, and redeploy. When deploying (even locally) a new static configuration, it's important that you remove both the portal-api and portal-api-data-static containers to make docker pick up the new configuration (it won't overwrite them).

Btw., I just realized that the configuration localhost should not be used for this use case (misleading documentation). Try to create a new environment called local or dev similar (just not localhost); if you create a localhost environment, some things are configured automatically in a way which does not match the docker setup (see https://github.com/Haufe-Lexware/wicked.haufe.io/blob/master/doc/development-environment.md) and is intended for local development of the wicked components themselves.

I will adapt the documentation accordingly, thanks for reporting.

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

I have found an issue with the docker images... will get back to this in a couple of minutes.

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

Horribly sorry. The last releases 0.9.1 and 0.9.2 were created by an automated script (to rule out manual mistakes, right?), but as it turned out, scripts can also have bugs. The result was that the portal-api image was left at 0.9.0, which cannot deal with the configuration written by the kickstarter 0.9.2.

Please do a docker pull haufelexware/wicked.portal-api and try again using a new localdev environment, as now described in the documentation. The release script has been fixed.

from wicked.haufe.io.

TESSaranya avatar TESSaranya commented on August 24, 2024

Hi Martin,

I am working with Aaron in this. Just a query after pulling haufelexware/wicked.portal-api , should use the command ## docker run -it --rm -v /path/to/repo:/var/portal-api -p 3333:3333 haufelexware/wicked.portal-api --new ?? if not, could you please let us know the steps after this docker pull??

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

The docker pull just updates the image for wicked.portal-api; the API is used inside the docker-compose.yml file, so you would only need to do the following:

$ cd /path/to/your/repo
$ docker-compose down # this removes all containers (including users, so beware)
$ docker-compose up # restart the thing

Then navigate to https://portal.local, and things should be fine.

from wicked.haufe.io.

TESSaranya avatar TESSaranya commented on August 24, 2024

When executed with docker-compose up. I got the following response. Can you let me know, what is the issue.

log.txt

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

The main error is:

Error: portal-env: Could not find environment file: /var/portal-api/static/env/localdev.json

This is most likely due to the fact that once a static volume container is built, it will be re-used. The Portal API has not picked up the changed configuration repository. This is described at the continuous deployment documentation page: https://github.com/Haufe-Lexware/wicked.haufe.io/blob/master/doc/continuous-deployment.md

Short version of that page: Your problems will most probably go away by doing the following:

$ cd /path/to/repo
$ docker-compose rm -fv portal-api-data-static # remove static config container
$ docker-compose build
$ docker-compose up -d --remove-orphans portal-api-data-static # start it once
$ docker-compose up -d --remove-orphans --force-recreate # start the portal

from wicked.haufe.io.

TESAARON avatar TESAARON commented on August 24, 2024

Hi Martin,

This fix worked perfectly. We now have a working api-portal that we can configure using kickstarter. I will keep you updated if we have any more issues!

Many thanks for your time,
Aaron

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

OK, glad to hear that! This is not even a "wicked" issue, but rather docker usage, which admittedly looks strange. Will at times work on the documentation of that thing. The "deploying locally" guide does not mention what to do when you want to refresh the configuration.

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

Closing.

from wicked.haufe.io.

Related Issues (20)

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.