Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matejsemancik/ktor-compose
Generate images using Compose Multiplatform on server
https://github.com/matejsemancik/ktor-compose
compose-multiplatform kotlin ktor-server
Last synced: 8 days ago
JSON representation
Generate images using Compose Multiplatform on server
- Host: GitHub
- URL: https://github.com/matejsemancik/ktor-compose
- Owner: matejsemancik
- License: mit
- Created: 2024-08-02T20:50:53.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-02T22:43:57.000Z (6 months ago)
- Last Synced: 2025-01-27T20:46:52.794Z (10 days ago)
- Topics: compose-multiplatform, kotlin, ktor-server
- Language: Kotlin
- Homepage:
- Size: 83 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ktor-compose
This is a sample Ktor server application demonstrating
how to render an image using Compose Multiplatform on server-side.There is just one endpoint `GET /image` with two optional arguments `width` and `height` which generates
the following image:![](docs/images/response.png)
The application can be run locally from IDE, or using Docker Compose. The server is exposed on `http://localhost:8080/`.
### Docker
There is a [Dockerfile](Dockerfile) demonstrating how to potentially dockerize such application.
To bring up the stack using Docker Compose:
`docker compose build && docker compose up` or `docker compose up --build`#### Potential improvements
The current Docker image is Ubuntu-based `eclipse-temurin:17-jre` and needs `mesa-utils` and `libgl1` dependencies to run Compose.
I'd like to experiment with Alpine-based image to bring down the final image size.