Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration in production environment #68

Open
giserxx opened this issue Sep 15, 2023 · 7 comments
Open

Configuration in production environment #68

giserxx opened this issue Sep 15, 2023 · 7 comments
Labels
question Further information is requested

Comments

@giserxx
Copy link

giserxx commented Sep 15, 2023

I want to deploy zoo-project on a cloud server and need to access it remotely via a specific IP instead of localhost. what configuration files do I need to change please.Thank you.

@giserxx giserxx added the question Further information is requested label Sep 15, 2023
@gfenoy
Copy link
Contributor

gfenoy commented Sep 15, 2023

The answer would depend on what is the standard you are willing to use and the way you want to get it configured.

Whatever is the standard you are willing to use, the first option would be to change any occurence of http://localhost by your https://server.domain.name in both the main.cfg and the oas.cfg. Nevertheless, if you do so, you should ensure that the server.domain.name is accessible from your pod. In case you are providing access to the swagger-ui that comes with the Open API - Processes - Part 1: Core standard, then you would also run a sed command to apply the same change (ie. sed "s=http://localhost=https://myserver.myhost/myname=g" -i /var/www/html/swagger-ui/oapip/*" -i /var/www/html/swagger-ui/oapip/*).

Another option, in case you are more focussed on the OGC API - Processes - Part 1: Core support, then the easiest is probably to use dynamic naming available for this standard support. You simply have to remove the rootHost definition from you oas.cfg and you should be ready to go. Obviously, this will work only OpenAPI or other clients applications that are able to use the hostname from a link defined in an OpenAPI (most of them do).

Also, your server may be behind a proxy and what ever is the address used to access the Server Instance you want it to remain its original ip address (for instance for using the JavScript ZOO-API to request other services that would be accessible locally) by defining the proxied parameter in the [main] section and set its value to true.

Please let us know if any of the option proposed here works for your needs.

@giserxx
Copy link
Author

giserxx commented Sep 16, 2023

@gfenoy Thank you for your helpful answer. I would also like to ask how to install the latest version of ZOO-Project on a Windows Server. Where can I download a compiled executable program (the link in the documentation is closed)? Or are there any other convenient methods?

@gfenoy
Copy link
Contributor

gfenoy commented Sep 16, 2023

Long time we did not build the ZOO-Project for use on the windows platform.

In the past we were using AppVeyor CI/CD for producing the package that was then uploaded on the bintray.com system which is no more available. I tried to run it few minutes ago but it has failed.

If there is an interest in having a packaged version for use on windows, we would be happy to work on this task. In the past, we were providing a binary package able to be used directly from the Microsoft™ IIS™ web server.

On the other hand, when I have to deploy the ZOO-Project on a window platform, I start by deploying using the defaut docker compose environment and using these instructions.

To be complete, you should also keep an eye on the following MS4W distribution. It is currently under development and a new version is coming shortly thanks to the amazing work by @jmckenna!

@giserxx
Copy link
Author

giserxx commented Sep 16, 2023

I believe many people like me who are used to the Windows are very much looking forward to an installation package for Windows environment. Haha! 😀

@jmckenna
Copy link
Contributor

Thanks for the mention @gfenoy. I hope to have questions soon to you as I dive into compiling the latest ZOO-Project source on Windows.

@giserxx
Copy link
Author

giserxx commented Sep 20, 2023

@gfenoy When I install ZOO using docker and replace all the "localhost" in the main.cfg and osa.fg files with "my IP:port", however the hyperlinks in the "ogc -api/index.html" page only changes the IP, not the port.
image

@gfenoy
Copy link
Contributor

gfenoy commented Sep 20, 2023

When running the ZOO-Project from the docker-compose environment, you can modify the value from the docker/oas.cfg file on line 4 to set it to http://<YOUR_IP>:<PORT>. After doing so, please remove the cached files in docker/tmp (rm docker/tmp/*zc* remove every cached files).

You can also remove the rootHost key or rename it from the docker/oas.cfg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants