Skip to content

Conversation

@marcopiraccini
Copy link
Contributor

@marcopiraccini marcopiraccini commented Oct 1, 2025

Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Comment on lines -32 to -36
const PlatformaticServiceSchema = Type.Union([
PlatformaticServiceWithImageSchema,
PlatformaticServiceWithLocalSchema
])

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the reason for this Union is that, in my opinion, it is confusing to say:

  • I want hot reload on this repository
  • but also use this image

This was one of the complaints from cib in knowing what was building

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but now desk knows because we use explicit profiles, right?
So, being this a schema definition, it should just support all cases, or am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I brought it up because showing the image details and the local repository details in the same profile are confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, having the image is useless and confusing. Removed.

# are compiled for the host OS and won't work in Alpine Linux
# 4. .env files from the host might have localhost connection strings that would override
# the Kubernetes environment variables
CMD sh -c 'find . -name ".env" -type f -delete && rm -rf node_modules && pnpm install && pnpm run dev'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the pitfalls we hit with cib is that the delete command would remove the .env from the project. This is why it did a mv .env .backup-env when starting and mv .backup-env .env when shutting down.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcopiraccini I know I left a lot of comments so this may have been missed: keeping the delete means that if someone were to run icc by itself, they would need to recreate their .env file every time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already a mv: https://github.com/platformatic/desk/blob/dev-prof-2/docker/Dockerfile.dev#L21

CMD sh -c 'find . -name ".env" -type f -exec mv {} {}.backup-env \; && rm -rf node_modules && pnpm install && pnpm run dev'

Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
@marcopiraccini marcopiraccini changed the title development profile support [WIP] Development profile support Oct 2, 2025
@marcopiraccini marcopiraccini marked this pull request as ready for review October 2, 2025 09:26
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
leorossi and others added 2 commits October 6, 2025 15:46
Signed-off-by: Leonardo Rossi <leonardo.rossi@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Copy link
Contributor

@leorossi leorossi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marcopiraccini marcopiraccini merged commit ac23194 into main Oct 7, 2025
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

Successfully merging this pull request may close these issues.

4 participants