Coder Social home page Coder Social logo

merginmaps / server Goto Github PK

View Code? Open in Web Editor NEW
123.0 123.0 44.0 8.33 MB

Mergin Maps: Store and track changes to your geo-data. Public repository for enterprise and community edition.

Home Page: https://merginmaps.com

Dockerfile 0.13% Shell 0.05% Python 30.63% HTML 3.28% JavaScript 0.27% Vue 31.05% Sass 1.21% SCSS 16.11% Mako 0.03% TypeScript 17.25%
cloud gis mergin merginmaps

server's People

Contributors

alhirzel avatar harminius avatar jozef-budac avatar lavor avatar luxusko avatar marcelgeo avatar peterpetrik avatar saberraz avatar tomasmizera avatar uprel avatar varmar05 avatar wonder-sk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

server's Issues

change gpkg schema without users having to delete and re-download project

--Feature request--
It would be great to be able to add tables and/or change/add fields in gpkg's without the user having to delete and re download projects.

Currenty we let our users know well in advance via whatsapp and email that we are planning a major project change and that they will have to delete and redownload projects on a certain date. we then remind them on a daily basis and come the specified date... more than half of them did not do it and we have conflicts everywhere.

So if possible this would be a game changer. 🤙🏻💪🏻

Format_Date in Mergin doesn't follow QGIS doc. It saves MMMM instead of MMM

Format_Date in Mergin doesn't follow QGIS doc.

If you use a format_date( now() ,'d MMM yyyy') (with 3 Ms) in your field widgets, QGIS will store it as:

MMM | the abbreviated localized month name (e.g. ‘Jan’ to ‘Dec’)

as described in
https://docs.qgis.org/3.28/en/docs/user_manual/expressions/functions_list.html#format-date

However, Mergin Maps stores it as the long localized month name (e.g. ‘January’ to ‘December’), as if you had configured it as:
format_date( now() ,'d MMMM yyyy') (4 Ms)

Persist data

Hi all,

When starting MerginMaps using docker I noticed that it creates a new volume .

Is there a way to persist the docker container database specifically for this setup?

I tried using named volumes this:

    volumes:
      - mergin_db:/var/lib/postgresql

but it did not seems to work.

At this moment every time I restart the containers, it creates a brand new volume, and I have to trigger the db init script, user creation script.

Thanks in advance

Sam

Project access permissions for users

Hello!

I'm running four projects on my instance and some of those projects are not related to others and may have some sensitive data. Just learned, that all users can see and download all projects, even if projects are not shared with them. Would be very useful, if that is possible only for users, who are given access to the exact project, otherwise, I have to run multiple instances of Mergin. Or is there another way? On the "real" MerginMaps server this was solved through workspaces, but I don't see this feature here.

Need help for admin account.

Hi

I have deployed the mergin application on my local machine using docker-compose.
Is there any way we can create a superuser to manage other users ???

Unique value validation

Hello,

I'm having a weird issue with a project. I made a public project called validation_test for you.

Here is the step to reproduce the issue :

1 - Add a new point with the "regard" layer.
2 - Just add a number in the "point" column and choose any type in the next row.
3- This is where it gets interesting. I have 2 relations with that layer. Pictures (photographies) and lines (Conduites). Without saving, add any of these 2 things and save. After then, you won't be able to save, you will get a message saying "point" value must be unique.
4- Just delete the number and re-enter the exact same. You will then be able to save (?).

There is another way to recreate this. Just create a regard point and then save after

entering a number and a type. Don't do anything else. Then, try to edit this point. You will need to delete it and re-enter the same number again before being able to save.

Note that after you did that, this issue is "fixed" and it won't happen again for this # .

I attached the QGIS project as well, in case I messed up somewhere.

Thank you

Public.zip

Connection with Input

Hello,
I was able to connect at mergin.mydomain.ch with different profils. I'm also able to connect on the "mergin plugin" on QGIS with different users.

But on Input, it always says "invalid user name or password"?

I don't know if it is a Mergin or an Input problem!

Input doesn't support multiple-selection field from a QGIS project ?

Hi,
I set up a multiple selection field in a layer in my QGIS project by the widget 'Value relation', and it would shows like {"valueA", "valueB"} as a label when I select more than one value. Therefore I use a expression for the value in the label as replace(replace(replace("Action", '{"', ''), '"}', ''), '","', '\n')
which can remove the {} and "" in the label, also can make the value show as a list, each value has its own line. It works well in my QGIS project. And when I synchronized it to my Input (on Ipad or Phone), it shows the same format label.

However, if I change the field value on Input (multi-selected in that field for a feature), then the label will back to the original format, which with the {""}. How can I solve this problem?
The image below shows the problem I described, the orange box at the left up corner is the correct format, and the problem one is at the middle (also a orange box)

Thank you,
Lei
image

How to automate table data retrieval from mergin CE?

Hello

I have successfully set up mergin on my local server. I am testing the use of the Input app to collect data. Is it possible to retrieve the attribute data collected by Input directly from mergin or the postgres dB? Like by using a python script? I am struggling to find where the attribute data is stored in the postgres dB.

I would like to get the data from the field in real time for display in my own web app - instead of manually retrieving from QGIS.

Thank you

Allow user to create and read only his own projects (GLOBAL_READ/GLOBAL_WRITE/GLOBAL_ADMIN)

Hi Mergin Team,

I'm trying to set up my own Mergin Maps instance (Community Edition) as well as possible, and more specifically projects authorizations using :

  • GLOBAL_READ
  • GLOBAL_WRITE
  • GLOBAL_ADMIN

But I'm surprised by how Mergin Maps works reacting on the value of these variables.

For example, by setting all the variables to False, I expected the user to only have the right to create and view his own projects. However, with GLOBAL_WRITE set to False, the user cannot even create a project. In QGIS, I get the following error message: "You do not have permissions to create a project in this workspace" and in the web interface I don't have the button to create projects.

If I set the GLOBAL_WRITE variable to True, the user can see all other users' projects, but I still get another error message when creating a project.
image

The only option that works for me to let users the ability to create projects is to set GLOBAL_ADMIN to True (I assume this is equivalent to GLOBAL_READ and GLOBAL_WRITE to True). But then users can see and write to other users' projects.

Could you please help me to understand the role and impact of the GLOBAL_READ, GLOBAL_WRITE and GLOBAL_ADMIN variables. In addition, what would be the correct configuration for authorizing a user to create his own projects and view only his own projects (or those shared with him)?

Thanks in advance for your help :)

Don't receive email in my account email

When I click on the button "Send Confirmation Email" from the Dashboard, the notification appears and it's written "Email was sent to address : ... " but I don't receive the email.
I have the same issue in my Profile view when I click on the button "Verify Email" :

  1. the modal is displayed
  2. I click on "Send" button but I don't receive any email.
    Do you have an idea about this issue ?
    Thanks

Invitations/members are not refreshed when you change organization

I created several organizations in Mergin and I want to invite users to appropriate organizations, but when I invite one user to one organization and change to another organization and then click on "members" - the invitation from previous organization are visible until you refresh the page.

Confusing quotas

image

Maybe one could have some more explanation about how these two quotas interact (the company versus the personal)?

Docker compose's PWD problem when using systemd

I tried to set up a systemd file to launch mergin at startup :

[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service

[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/user/mergin
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose down
TimeoutStartSec=0

[Install]
WantedBy=multi-user.target

But when I try to launch the service, it complain about the nginx.conf file mount.
It try to mount it from the root, becouse of the ${PWD}used here : https://github.com/MerginMaps/mergin/blob/master/docker-compose.yml#L55

A solution is to replace it with the full path to the nginx.conf file.

I share it, maybe it could be useful to others.

Linking user-accounts via OIDC/Oauth2?

Is there a way, preferably through OIDC/Oauth2, to link the login and user-accounts to another service?

I would like to allow users of my self-hosted Nextcloud instance to also use a self-hosted Mergin instance without having to manage separate logins.

Thanks!

Authentification failed on Iphone with a custom mergin server

While the authentification works on an iPhone using the public mergin server it does not work using a "private" mergin server (a mergin server on my own server). I have tried to do it on two different iPhone and same result : "Incorrect username or password". The same credentials works when using an android phone.

Have you ever noticed such problems ?

Auth/Login Error

Hello

I am trying to setup using docker. I am a bit new to this, but have set up some previous dockers successfully. I can access the GUI, but when i try to register an account, it stays on the signup page. The error log is below. I suspect that the tables are not present in the postgres dB. Are the tables supposed to be created automatically? Thanks in advance for any help.

[ERROR] [25] Error handling request /auth/login||Traceback (most recent call last):|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1707, in _execute_context|| cursor, statement, parameters, context|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 716, in do_execute|| cursor.execute(statement, parameters)||psycopg2.errors.UndefinedTable: relation "user" does not exist||LINE 2: FROM "user" || ^||||||The above exception was the direct cause of the following exception:||||Traceback (most recent call last):|| File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base_async.py", line 56, in handle|| self.handle_request(listener_name, req, client, addr)|| File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/ggevent.py", line 160, in handle_request|| addr)|| File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base_async.py", line 107, in handle_request|| respiter = self.wsgi(environ, resp.start_response)|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2464, in call|| return self.wsgi_app(environ, start_response)|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2450, in wsgi_app|| response = self.handle_exception(e)|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1867, in handle_exception|| reraise(exc_type, exc_value, tb)|| File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise|| raise value|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app|| response = self.full_dispatch_request()|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request|| rv = self.handle_user_exception(e)|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception|| reraise(exc_type, exc_value, tb)|| File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise|| raise value|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request|| rv = self.dispatch_request()|| File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request|| return self.view_functionsrule.endpoint|| File "/app/src/auth/init.py", line 115, in login|| user = authenticate(form.login.data, form.password.data)|| File "/app/src/auth/init.py", line 56, in authenticate|| user = User.query.filter_by(**query).one_or_none()|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 2776, in one_or_none|| return self._iter().one_or_none()|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 2837, in _iter|| execution_options={"_sa_orm_load_options": self.load_options},|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1670, in execute|| result = conn._execute_20(statement, params or {}, execution_options)|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1521, in _execute_20|| return meth(self, args_10style, kwargs_10style, execution_options)|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/sql/elements.py", line 314, in _execute_on_connection|| self, multiparams, params, execution_options|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1400, in _execute_clauseelement|| cache_hit=cache_hit,|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1750, in execute_context|| e, statement, parameters, cursor, context|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1931, in handle_dbapi_exception|| sqlalchemy_exception, with_traceback=exc_info[2], from=e|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 211, in raise|| raise exception|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1707, in _execute_context|| cursor, statement, parameters, context|| File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 716, in do_execute|| cursor.execute(statement, parameters)||sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "user" does not exist||LINE 2: FROM "user" || ^||||[SQL: SELECT "user".id AS user_id, "user".username AS user_username, "user".email AS user_email, "user".passwd AS user_passwd, "user".active AS user_active, "user".is_admin AS user_is_admin, "user".verified_email AS user_verified_email, "user".inactive_since AS user_inactive_since ||FROM "user" ||WHERE "user".username = %(username_1)s]||[parameters: {'username_1': 'Desigan'}]||(Background on this error at: http://sqlalche.me/e/14/f405)

User creation via admin page

I can't found a way to create a new user in the webapp.

When I get to "/admin", I can manage existing users account, but can't create a new one.

Is the bash docker command the only way to do it ?

Default Storage Size not changing from 100MB

Hello

I have tried to change the default storage size from 100MB to 4GB on the docker compose file but on the mergin server it still shows 100MB in the bottom left corner.

I am running it on Portainer, ubuntu desktop. I have been able to change other environment variables on the docker compose file and I know it works as the changes reflect once I deploy.

Any help please?

Error during app creation on docker - Linux

Hello,
Thank for the work done... Congratulations...

I am facing some issue when deploying Mergin server on my server

Here is the error : standard_init_linux.go:219: exec user process caused: exec format error

Is there any way to bypass it?

Regards.

What is SLACK_HOOK_URL ?

I can't find what I should put in the docker-compose at the line "SLACK_HOOK_URL=fixme"? Where can I find information for this?

And what does it do?

app.html template missing

Hello,

I was trying to deploy the server using the flask application, everything runs well but when I try to request the first page, flask indicate me that it can't find the app.html template.

And after further investigations it seems Indeed missing from the template folder.

Data writers role

I think it would be useful if we had "data writer" role for users who will only be able to change data and sync those changes to Mergin, and not be able to push changes in data structure (new layers, existing layers) or qgz changes. In small teams this is not an issue, but in big teams, when some of them have some knowledge of QGIS, some changes can be pushed accidentally or intentionally but unaware of potential conflicts and problems. We cannot control who is using only Input, and who is using Input and Qgis. Perhaps in future "data writers" could make some "pull request" for new layers or qgz changes to "project writers" and "owners". I think the best solution is to enable "owners" to make all changes, and "writers" just data changes.

Data types with unpredictable results in the UI of INPUT

We have been testing working via Mergin/Input on archaeological sites (and YAY what a nice product), but are presently kicking at a "stone" that wont budge it seems... We have been using boolean and date as formats for some data collection tables, and for the first three cases it worked just fine in the Input interface, giving a toggle switch for boolean fields, and a date field with a calendar pop-up for date fields.

Alas now every single time we try this the fields are only shown as regular data field (text input box).
We have turned the "stone" in every angle we can think of:
Copying GPKG files that work to the new case (accepting the "false" name)
Saving copies of GPKG files that DO work, creating new GPKG files that sadly DONT
Moving affected the layers to projects without the problem
Creating new layers in projects without the problem, which do also not work
Avoiding spaces and special characters in file and field naming.

-but all to no avail...

The data types work fine in Qgis 3.16 and 3.18.1 (check box for boolean and calendar pop up for date format fields).

Is there a bug in Input itself?

I have made a public demo of the error under my user name: Datafieldtype

SIMKFR

No email sent

Dear all,

I have set up my server for Mergin. It works well except for the email part.
I have installed and configured Postfix for sending emails, opened port 587, even configured email forwarding with Postale.io.
Before these configurations, I noticed several errors such as Connection refused.
Currently, there is no error message in the terminal, so I was wondering what I missed.
Thanks.

Screen Shot 2021-09-22 at 08 52 10

Mergin CE with Docker on Ubuntu 18.04 steps after installation

Hi,
I'm new to Docker and
I followed the instructions to install mergin via Docker on our server (Ubuntu 18.04 on e.g. 'our_server.com').
Now I have

  • mergin-server
  • mergin-db
  • mergin-redis
    running,
    but I have no idea what are the next steps.

How can I access the mergin-server and the admin panel or how can I
connect to QGIS trough the Mergin Maps Plugin to create and manage new projects?

Virtual field with packaged project

Hello,

When you package a projet for Mergin with a virtual field in a layer, the field is "converted" to a regular field (when you look at the project in QGIS). However, then you delete the said field, save the changes and re-open the layer, the virtual field "appears".

When creating the Mergin project, is you use "use current Qgis project as is", the virtual field stays the same.

QGIS 3.26.1

Thanks guys

Tab containing only tabs not showing

Hello,

In the form manager, when you make a tab containing only tabs, the tab name do not show.

image
Screenshot_20220809-172209

If you add a field in the said tab, it shows (incorrectly - it should be before field 1)

image

Screenshot_20220809-171913

I'm not sure it if's a specific phone related issue, I have not try this on a tablet (only pixel 3a).

The screenshot above are from a project I just created for testing purpose. I first encounter this with that project below. I have a rule set so that if you choose between "rigide" or "flexible", it shows only the according tab. However it's not working because of that issue. The rules works fine in QGIS. I have version 3.26.1.

image

Thank you everyone, keep up the good work.

Deleting organisations - Projects remain

When I delete organisation, projects in that organization remain visible through mergin client (cli and Qgis). I think the deletion of organization should also delete all projects (should be some warning - "are you really, really, sure").

Use MERGIN_BASE_URL to generate verify link in email

I use a nginx proxy with this config

    location / {
        proxy_pass         http://127.0.0.1:5000/;
        proxy_set_header   Host $host;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-Proto https;
        proxy_set_header   X-Forwarded-Host mergin.nicodet.fr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    }

In email, the verify link is http
image

Windows 10 DB_PORT invalid literal

Trying to install Mergin CE on Docker Desktop on a Windows 10 VM. Using minimal changes to the .prod.env file, I am still getting the error below. The line for the DB Port value in the .prod.env file is 'DB_PORT=5432' (Without the apostrophes)

PS C:\Mergin> docker-compose -f docker-compose.yml up time="2023-07-26T16:16:29+01:00" level=warning msg="The \"PWD\" variable is not set. Defaulting to a blank string." [+] Running 6/6 ✔ Network mergin_merginmaps Created 0.3s ✔ Container merginmaps-redis Created 0.7s ✔ Container merginmaps-proxy Created 0.6s ✔ Container merginmaps-db Created 0.6s ✔ Container merginmaps-server Created 0.5s ✔ Container merginmaps-web Created 0.5s Attaching to merginmaps-db, merginmaps-proxy, merginmaps-redis, merginmaps-server, merginmaps-web merginmaps-redis | 1:C 26 Jul 2023 15:16:35.535 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo merginmaps-redis | 1:C 26 Jul 2023 15:16:35.548 # Redis version=7.0.12, bits=64, commit=00000000, modified=0, pid=1, just started merginmaps-redis | 1:C 26 Jul 2023 15:16:35.558 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf merginmaps-redis | 1:M 26 Jul 2023 15:16:35.559 * monotonic clock: POSIX clock_gettime merginmaps-redis | 1:M 26 Jul 2023 15:16:35.560 * Running mode=standalone, port=6379. merginmaps-redis | 1:M 26 Jul 2023 15:16:35.560 # Server initialized merginmaps-redis | 1:M 26 Jul 2023 15:16:35.560 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. merginmaps-redis | 1:M 26 Jul 2023 15:16:35.561 * Ready to accept connections merginmaps-proxy | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration merginmaps-proxy | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ merginmaps-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh merginmaps-proxy | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist merginmaps-proxy | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh merginmaps-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh merginmaps-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh merginmaps-proxy | /docker-entrypoint.sh: Configuration complete; ready for start up merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: using the "epoll" event method merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: nginx/1.25.1 merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14) merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: OS: Linux 5.15.90.1-microsoft-standard-WSL2 merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: start worker processes merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: start worker process 19 merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: start worker process 20 merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: start worker process 21 merginmaps-proxy | 2023/07/26 15:16:36 [notice] 1#1: start worker process 22 merginmaps-server | [INFO] [10] Starting gunicorn 19.9.0 merginmaps-server | [INFO] [10] Listening at: http://0.0.0.0:5000 (10) merginmaps-server | [INFO] [10] Using worker: gevent merginmaps-server | /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used merginmaps-server | return io.open(fd, *args, **kwargs) merginmaps-server | [INFO] [14] Booting worker with pid: 14 merginmaps-server | /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used merginmaps-server | return io.open(fd, *args, **kwargs) merginmaps-server | [INFO] [15] Booting worker with pid: 15 merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: using the "epoll" event method merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: nginx/1.23.4 merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: OS: Linux 5.15.90.1-microsoft-standard-WSL2 merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: start worker processes merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: start worker process 7 merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: start worker process 8 merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: start worker process 9 merginmaps-web | 2023/07/26 15:16:41 [notice] 1#1: start worker process 10 merginmaps-server | [INFO] [14] Numpy was not imported, continuing without requires() merginmaps-server | [INFO] [15] Numpy was not imported, continuing without requires() merginmaps-server | [2023-07-26 16:16:49,943: INFO/MainProcess] beat: Starting... merginmaps-server | [2023-07-26 16:16:50,649: INFO/MainProcess] Connected to redis://merginmaps-redis:6379/0 merginmaps-server | [2023-07-26 16:16:50,681: INFO/MainProcess] mingle: searching for neighbors merginmaps-server | [2023-07-26 16:16:51,745: INFO/MainProcess] mingle: all alone merginmaps-server | [2023-07-26 16:16:51,860: INFO/MainProcess] celery@b173bcbf448a ready. merginmaps-server | [2023-07-26 16:16:51,879: INFO/MainProcess] Received task: mergin.stats.tasks.send_statistics[a7df44ed-2e57-451b-bb23-500deda51389] merginmaps-server | [2023-07-26 16:16:51,898: INFO/MainProcess] Received task: mergin.stats.tasks.send_statistics[86c27d51-2697-4053-a0a3-9b89877dfd16] merginmaps-server | [2023-07-26 16:16:51,911: ERROR/ForkPoolWorker-1] Task mergin.stats.tasks.send_statistics[a7df44ed-2e57-451b-bb23-500deda51389] raised unexpected: ValueError("invalid literal for int() with base 10: '{DB_PORT}'") merginmaps-server | Traceback (most recent call last): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/celery/app/trace.py", line 412, in trace_task merginmaps-server | R = retval = fun(*args, **kwargs) merginmaps-server | File "/app/mergin/celery.py", line 66, in __call__ merginmaps-server | return self.run(*args, **kwargs) merginmaps-server | File "/app/mergin/stats/tasks.py", line 35, in send_statistics merginmaps-server | if not db.engine.has_table("mergin_info"): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 998, in engine merginmaps-server | return self.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine merginmaps-server | return connector.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 592, in get_engine merginmaps-server | sa_url = make_url(uri) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 738, in make_url merginmaps-server | return _parse_url(name_or_url) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 794, in _parse_url merginmaps-server | components["port"] = int(components["port"]) merginmaps-server | ValueError: invalid literal for int() with base 10: '{DB_PORT}' merginmaps-server | [2023-07-26 16:16:51,927: ERROR/ForkPoolWorker-2] Task mergin.stats.tasks.send_statistics[86c27d51-2697-4053-a0a3-9b89877dfd16] raised unexpected: ValueError("invalid literal for int() with base 10: '{DB_PORT}'") merginmaps-server | Traceback (most recent call last): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/celery/app/trace.py", line 412, in trace_task merginmaps-server | R = retval = fun(*args, **kwargs) merginmaps-server | File "/app/mergin/celery.py", line 66, in __call__ merginmaps-server | return self.run(*args, **kwargs) merginmaps-server | File "/app/mergin/stats/tasks.py", line 35, in send_statistics merginmaps-server | if not db.engine.has_table("mergin_info"): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 998, in engine merginmaps-server | return self.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine merginmaps-server | return connector.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 592, in get_engine merginmaps-server | sa_url = make_url(uri) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 738, in make_url merginmaps-server | return _parse_url(name_or_url) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 794, in _parse_url merginmaps-server | components["port"] = int(components["port"]) merginmaps-server | ValueError: invalid literal for int() with base 10: '{DB_PORT}' merginmaps-server | [2023-07-26 16:16:51,933: INFO/MainProcess] Received task: mergin.stats.tasks.send_statistics[6ccaef30-2fbe-40d0-8735-ff88677ffac0] merginmaps-server | [2023-07-26 16:16:51,963: INFO/MainProcess] Received task: mergin.stats.tasks.send_statistics[c47d3a68-7ce2-4e77-b4dd-ef0a0eb5f2c7] merginmaps-server | [2023-07-26 16:16:51,996: ERROR/ForkPoolWorker-4] Task mergin.stats.tasks.send_statistics[6ccaef30-2fbe-40d0-8735-ff88677ffac0] raised unexpected: ValueError("invalid literal for int() with base 10: '{DB_PORT}'") merginmaps-server | Traceback (most recent call last): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/celery/app/trace.py", line 412, in trace_task merginmaps-server | R = retval = fun(*args, **kwargs) merginmaps-server | File "/app/mergin/celery.py", line 66, in __call__ merginmaps-server | return self.run(*args, **kwargs) merginmaps-server | File "/app/mergin/stats/tasks.py", line 35, in send_statistics merginmaps-server | if not db.engine.has_table("mergin_info"): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 998, in engine merginmaps-server | return self.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine merginmaps-server | return connector.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 592, in get_engine merginmaps-server | sa_url = make_url(uri) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 738, in make_url merginmaps-server | return _parse_url(name_or_url) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 794, in _parse_url merginmaps-server | components["port"] = int(components["port"]) merginmaps-server | ValueError: invalid literal for int() with base 10: '{DB_PORT}' merginmaps-server | [2023-07-26 16:16:52,000: ERROR/ForkPoolWorker-3] Task mergin.stats.tasks.send_statistics[c47d3a68-7ce2-4e77-b4dd-ef0a0eb5f2c7] raised unexpected: ValueError("invalid literal for int() with base 10: '{DB_PORT}'") merginmaps-server | Traceback (most recent call last): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/celery/app/trace.py", line 412, in trace_task merginmaps-server | R = retval = fun(*args, **kwargs) merginmaps-server | File "/app/mergin/celery.py", line 66, in __call__ merginmaps-server | return self.run(*args, **kwargs) merginmaps-server | File "/app/mergin/stats/tasks.py", line 35, in send_statistics merginmaps-server | if not db.engine.has_table("mergin_info"): merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 998, in engine merginmaps-server | return self.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine merginmaps-server | return connector.get_engine() merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py", line 592, in get_engine merginmaps-server | sa_url = make_url(uri) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 738, in make_url merginmaps-server | return _parse_url(name_or_url) merginmaps-server | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/url.py", line 794, in _parse_url merginmaps-server | components["port"] = int(components["port"]) merginmaps-server | ValueError: invalid literal for int() with base 10: '{DB_PORT}' merginmaps-db | merginmaps-db | PostgreSQL Database directory appears to contain a database; Skipping initialization merginmaps-db | merginmaps-db | merginmaps-db | 2023-07-26 15:16:53.096 UTC [1] LOG: starting PostgreSQL 14.8 (Debian 14.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit merginmaps-db | 2023-07-26 15:16:53.096 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 merginmaps-db | 2023-07-26 15:16:53.096 UTC [1] LOG: listening on IPv6 address "::", port 5432 merginmaps-db | 2023-07-26 15:16:53.146 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" merginmaps-db | 2023-07-26 15:16:53.353 UTC [29] LOG: database system was shut down at 2023-07-26 15:15:44 UTC merginmaps-db | 2023-07-26 15:16:53.822 UTC [1] LOG: database system is ready to accept connections

Manage User

Where can we manage the users?
I created different users for test. How can I delete them?

What I found also "strange", is that I have no "local" volume with this data in docker!?! We only have the projects.

It will be problematic if I want to update the container, no? I will lose all the users? Or am I wrong?

Install on windows looking for wrong version of pygeodiff.dll

After successful install on windows 10, Mergin fails to create new projects.
Version 0.8.6 of pygeodiff only created pygeodiff-0.8.6-python-win32.dll in the env/Lib/site-packages/pygeodiff folder when Mergin is looking for pygeodiff-0.8.6-python.dll.
This seems to be an old pygeodiff issue but which should have been fixed.

Got around it by copying pygeodiff-0.8.6-python-win32.dll and renaming to pygeodiff-0.8.6-python.dll, not sure this is the correct method or should Mergin be used like that.

WARNING:root:HTTP 400: Failed to initialize project: Unable to locate GeoDiff library, tried C:\Users\User\.virtualenvs\server-jpXDwBY0\Lib\site-packages\pygeodiff\pygeodiff-0.8.6-python.dll and geodiff on system.
image

uploading a large (2+G) raster layer from either QGIS or the web UI time-outs connection

connection timed out, timeout 300.00

[ERROR] [23] Error handling request /v1/project/push/chunk/181c0e85-5731-4dae-9487-13a9f27e5637/qmqx4lw3atj||Traceback (most recent call last):||  File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base_async.py", line 56, in handle||    self.handle_request(listener_name, req, client, addr)||  File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/ggevent.py", line 160, in handle_request||    addr)||  File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base_async.py", line 107, in handle_request||    respiter = self.wsgi(environ, resp.start_response)||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2464, in __call__||    return self.wsgi_app(environ, start_response)||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2450, in wsgi_app||    response = self.handle_exception(e)||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1867, in handle_exception||    reraise(exc_type, exc_value, tb)||  File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise||    raise value||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app||    response = self.full_dispatch_request()||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request||    rv = self.handle_user_exception(e)||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception||    reraise(exc_type, exc_value, tb)||  File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise||    raise value||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request||    rv = self.dispatch_request()||  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request||    return self.view_functions[rule.endpoint](**req.view_args)||  File "/app/src/auth/__init__.py", line 41, in wrapped_func||    if not current_user or not current_user.is_authenticated:||  File "/usr/local/lib/python3.6/dist-packages/werkzeug/local.py", line 329, in __bool__||    return bool(self._get_current_object())||  File "/usr/local/lib/python3.6/dist-packages/werkzeug/local.py", line 307, in _get_current_object||    return self.__local()||  File "/usr/local/lib/python3.6/dist-packages/flask_login/utils.py", line 26, in <lambda>||    current_user = LocalProxy(lambda: _get_user())||  File "/usr/local/lib/python3.6/dist-packages/flask_login/utils.py", line 302, in _get_user||    current_app.login_manager._load_user()||  File "/usr/local/lib/python3.6/dist-packages/flask_login/login_manager.py", line 317, in _load_user||    return self.reload_user()||  File "/usr/local/lib/python3.6/dist-packages/flask_login/login_manager.py", line 279, in reload_user||    user = self.user_callback(user_id)||  File "/app/src/auth/__init__.py", line 97, in load_user||    return User.query.get(user_id)||  File "<string>", line 2, in get||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/deprecations.py", line 390, in warned||    return fn(*args, **kwargs)||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 933, in get||    return self._get_impl(ident, loading.load_on_pk_identity)||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 945, in _get_impl||    execution_options=self._execution_options,||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2800, in _get_impl||    load_options=load_options,||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/loading.py", line 535, in load_on_pk_identity||    bind_arguments=bind_arguments,||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1669, in execute||    conn = self._connection_for_bind(bind, close_with_result=True)||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1520, in _connection_for_bind||    engine, execution_options||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind||    conn = bind.connect()||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 3096, in connect||    return self._connection_cls(self, close_with_result=close_with_result)||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 92, in __init__||    else engine.raw_connection()||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 3175, in raw_connection||    return self._wrap_pool_connect(self.pool.connect, _connection)||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 3142, in _wrap_pool_connect||    return fn()||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool/base.py", line 301, in connect||    return _ConnectionFairy._checkout(self)||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool/base.py", line 761, in _checkout||    fairy = _ConnectionRecord.checkout(pool)||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool/base.py", line 419, in checkout||    rec = pool._do_get()||  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool/impl.py", line 137, in _do_get||    code="3o7r",||sqlalchemy.exc.TimeoutError: QueuePool limit of size 2 overflow 10 reached, connection timed out, timeout 300.00 (Background on this error at

Impossible to get a project list in Input when deploying outside docker

Hello,

I Encounter a problem trying to deploy the server outside the docker container following the procedure in developpement.md.
I can deploy everything I can log in in the web client and in the Qgis plugin, I can also upload and retrieve a project from the web or the plugin.
But when it comes to the mobile client The app seem to be unable to get the project list from the server.
Server side I only got a ping 200 and no error whatsoever.

If i use the dockerized server on the same config everything works fine. (outside other issues already discussed on github)

Thansk you for your consideration.

Permission denied: '/projects'

Hello

When I try to create a new project, I get an error that says "Failed to initialize project: [Errno 13] Permission denied: '/projects' ". I have installed the docker container on a Synology NAS and mounted the local folder ./projects to the /data folder. I have checked via SSH and it appears that the folder ownership and permissions have been set correctly. Please see the screenshots attached.

Any idea on how to resolve this?

folder status
mergin permission error

Projects visible by all users

Hi,

I'm surprised because the projects created by a user are visible to everyone. As suggested in this ticket (#81), I change in .prod.env the default parameters to :

GLOBAL_READ=False
GLOBAL_WRITE=False
GLOBAL_ADMIN=False

Then I've reloaded the service with docker-compose up --force-recreate -d.

But even after these changes, projects are still available to everyone.

Do you know what I must change to be sure that a project can be visible only if a user share it with someone else ?

Thanks for your help,

Arnaud

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.