Giter VIP home page Giter VIP logo

Comments (7)

dhimmel avatar dhimmel commented on June 12, 2024

It might be as simple as docker compose up...

from trackmyairtag.

iakat avatar iakat commented on June 12, 2024

hey. thank you for your interest! I think it is. I used to run the docker stack on a remote server, and then ran locally on the macbook:

TMA_DATABASE_DSN=postgres://...:5432/trackmyairtag adev runserver app.py

from trackmyairtag.

dhimmel avatar dhimmel commented on June 12, 2024

Thanks @katlol. Nice design that you can easily run the docker stack on a server.

Am figuring things out locally now on a mac with FindMy running. After changing the user in:

https://github.com/katlol/trackmyairtag/blob/533d603eff3c46842c3ba12000a40ad46e0cfb09/docker-compose.yaml#L8

docker compose up launches properly.

However, I'm hitting:

web_1       |   File "asyncpg/protocol/protocol.pyx", line 168, in prepare
web_1       | asyncpg.exceptions.UndefinedTableError: relation "log" does not exist
postgres_1  | 2023-05-10 14:07:01.165 UTC [30] ERROR:  relation "log" does not exist at character 368
postgres_1  | 2023-05-10 14:07:01.165 UTC [30] STATEMENT:  
postgres_1  | 	                SELECT
postgres_1  | 	                    id,
postgres_1  | 	                    name,
postgres_1  | 	                    address,
postgres_1  | 	                    timestamp,
postgres_1  | 	                    latitude,
postgres_1  | 	                    longitude,
postgres_1  | 	                    altitude,
postgres_1  | 	                    raw->'location'->'horizontalAccuracy' as accuracy,
postgres_1  | 	                    raw->'role'->'emoji' as emoji
postgres_1  | 	                FROM log
postgres_1  | 	                WHERE
postgres_1  | 	                    log.timestamp IN (SELECT max(timestamp) FROM log AS b WHERE log.id = b.id)

Perhaps _initdb hasn't run yet. Should that happen automatically or does the user need to trigger it?

from trackmyairtag.

iakat avatar iakat commented on June 12, 2024

yeah, you are right. that does not seem to be called anywhere.

perhaps we want to wrap it in a try/except on connection (in case it runs for the second time?) or make it idempotent (it might already be?)

from trackmyairtag.

dhimmel avatar dhimmel commented on June 12, 2024

make it idempotent (it might already be?)

Okay included as part of #3. I believe _initdb works fine when called on an existing database due to CREATE TABLE IF NOT EXISTS.

from trackmyairtag.

iakat avatar iakat commented on June 12, 2024

@dhimmel see #4 maybe related?

from trackmyairtag.

iakat avatar iakat commented on June 12, 2024

@dhimmel please reopen if this is still an issue.

from trackmyairtag.

Related Issues (6)

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.