#Dagger services for local development

1 messages · Page 1 of 1 (latest)

junior moat
#

Is it a good approach to use Dagger to run services in local development mode? I have tried using the code below to set up some simple services for use during development. The problem here is that I don't know how to connect to these services on my local machine. Could someone help me with that?
Attached is what I tried at the moment.
thank you in advance!

Note: I tried the below command to starting up the services and accessing the service.

dagger call services
mysql -h 127.0.0.1 -P 3306 -u root -prootpassword -A
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (61)
hexed wharf
# junior moat Is it a good approach to use Dagger to run services in local development mode? I...

hey there! yes, it's a good approach to connect to your module services.

I think this is not working because the proxy module uses http by default. You need to set the isTcp flag to true here https://daggerverse.dev/mod/github.com/kpenfound/dagger-modules/proxy@3e9129a119151eb122e5fe380bd2d4313d8fc001#Proxy.withService to be able to proxy non http connections

junior moat
#

hey @hexed wharf Thank you for your quick response. I tried as you suggested. You can refer to my attached file to see how I defined the services, but unfortunately, it did not work for me. Do you see anything wrong there?

hexed wharf
#

just return the Service type and call it with dagger call services up

junior moat
#

lemme try it quick

junior moat
# hexed wharf just return the `Service` type and call it with `dagger call services up`

I got this error 😄

IntrospectionError: could not resolve type reference for any.
    at DaggerModule.resolveReferences (/src/olivia/sdk/src/module/introspector/dagger_module/module.ts:278:13)
    at new DaggerModule (/src/olivia/sdk/src/module/introspector/dagger_module/module.ts:134:10)
    at scan (/src/olivia/sdk/src/module/introspector/index.ts:18:18)
    at async connection.LogOutput (/src/olivia/sdk/src/module/entrypoint/entrypoint.ts:17:26)
    at async <anonymous> (/src/olivia/sdk/src/connect.ts:44:11)
    at async withGQLClient (/src/olivia/sdk/src/common/graphql/connect.ts:24:12)
    at async <anonymous> (/src/olivia/sdk/src/connect.ts:40:9)
    at async connection (/src/olivia/sdk/src/connect.ts:38:5)
    at async entrypoint (/src/olivia/sdk/src/module/entrypoint/entrypoint.ts:11:3) {
  cause: undefined,
  code: 'D110'
}
hexed wharf
low fox
#

@hexed wharf Is it supported now in dagger watch manner? if yes then please share it

hexed wharf
low fox