Conversation
…iguring environment variables
…update FCM configuration in Docker Compose
…ity-configuration
| @@ -1,5 +1,5 @@ | |||
| # Start with a base image containing golang runtime | |||
| FROM golang:1.20 | |||
| FROM golang:1.23 | |||
There was a problem hiding this comment.
@zond do you anticipate any problems with upgrading to go 1.23? It is required for the new FCM package, or some of its dependencies.
| } | ||
|
|
||
| func infoToUser(ui *oauth2service.Userinfoplus) *User { | ||
| func infoToUser(ui *oauth2service.Userinfo) *User { |
There was a problem hiding this comment.
I had to change this to get the service to start. I suspect it comes from some indirect dependency which was upgraded and the original type no longer exists?
| sleep 20 && | ||
| curl -XPOST http://diplicity-application:8080/_configure | ||
| -d '{\"OAuth\": { \"ClientID\": \"${OAUTH_CLIENT_ID}\", \"Secret\": \"${OAUTH_SECRET}\" }, \"FCMConf\": { \"ServerKey\": \"${FCM_SERVER_KEY}\" }}' | ||
| " |
There was a problem hiding this comment.
This is a helper container that comes up and sends the values from .env to the service. Saves having to do it manually every time. There's a few values missing like SendGrid, but I'll add them as I go
| log.Errorf(ctx, "Unable to encode FCM data payload %v: %v; fix NewFCMData", msgContext.fcmData, err) | ||
| return err | ||
| } | ||
|
|
There was a problem hiding this comment.
I've gotten rid of the data payload in notifications for now. I understand that they are used to power the click action on the client side.
I'm not convinced that it is the best approach, I'm going to re-implement the click actions later, and hopefully in a way that is a little more straight-forward. I was struggling a lot with the encoding and decoding of data. Felt like client knew too much about what was being sent to it. I reckon there's an easier way.
No description provided.