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

use without FQDN #2

Open
mach0 opened this issue Oct 11, 2022 · 6 comments
Open

use without FQDN #2

mach0 opened this issue Oct 11, 2022 · 6 comments

Comments

@mach0
Copy link
Contributor

mach0 commented Oct 11, 2022

I'd like to try starting this service with docker compose, but as I am "inside" a network there will be no DNS resolution (from outside - that means no letsencrypt or something like this)
Is there a possibility to get this running without fully qualified domain names (e.g. without having to use init.sh)?
I tried to start it but it seems nginx is not answering (starting) without having the certificates available.

@aothms
Copy link
Collaborator

aothms commented Oct 11, 2022

You can either run the development mode (postgres -> sqlite, apache/gunicorn -> flask dev server, redis -> python thread).

Or substitute the nginx config with https://github.com/AECgeeks/ifc-pipeline/blob/voxels/nginx_http_only/app.conf to disable ssl

@mach0
Copy link
Contributor Author

mach0 commented Oct 12, 2022

Hi I tried to apply app.conf for nginx, which basically works, but redirects to a "buildingsmart" authentication homepage.
And I also tried to set DEVELOPMENT to True which results in a "decode.json" not being found.
Is there an example of an decode.json somewhere or how can I circumvent the authentication to only use it for local purposes?
(not being a FLASK Pro here)

@aothms
Copy link
Collaborator

aothms commented Oct 12, 2022

Good point. I think it's sufficient to replace these lines

https://github.com/buildingSMART/validate/blob/release/application/main.py#L132-L143

So that the login_required decorator becomes:

def login_required(f):
    @wraps(f)
    def decorated_function(*args, **kwargs):
        user_data = {'sub': 'my-user-id-0', 'email': 'test@example.org', 'name': 'Test User', 'given_name': 'Test', 'family_name': 'User'}
        return f(user_data, *args, **kwargs)
    return decorated_function

Maybe we should restructure things so that it's possible to configure the code to behave like this from the outside. If you have some ideas feel free to send in a Pull Request ;)

@mach0
Copy link
Contributor Author

mach0 commented Oct 13, 2022

thanks a lot for your help! Got it running.
If I find a way to make the "local" installation easier I will surely create a pull request, but I am afraid I have to learn FLASK before that :)
One small thing I noticed: I never knew when uploading an IFC File was finished to start validation. Maybe there is already something, but I did not notice when uploading finished and everything was ready to click on "start validation". Is there a way to better show (or even validate automatically) when the file has finished uploading and is ready?
Now diving deeper into it and hopefully can help at some point.

@aothms
Copy link
Collaborator

aothms commented Oct 13, 2022

One small thing I noticed: I never knew when uploading an IFC File was finished to start validation. Maybe there is already something, but I did not notice when uploading finished and everything was ready to click on "start validation". Is there a way to better show (or even validate automatically) when the file has finished uploading and is ready?

I think there is a misunderstanding. The [Start validation] button starts the upload and adds the tasks to the queue, so in your case most likely immediately begins processing.

@mach0
Copy link
Contributor Author

mach0 commented Oct 13, 2022

ah ok thanks - it's just when I select a ifc file with the dialog, there is some "movement" on the white bar inside the window here - so I thought that might indicate an "upload". Thanks for clarification.

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

No branches or pull requests

2 participants