Ive finally managed to get kotlin/wasm app on dock...
# webassembly
h
Ive finally managed to get kotlin/wasm app on docker compose and nginx. So in case anyone else struggles or searches for info I will leave it here
Copy code
# syntax=docker/dockerfile:1
FROM gradle:8.4.0-jdk17 AS builder
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src

RUN gradle wasmJsBrowserDistribution --no-daemon

FROM nginx:alpine
COPY --from=builder /home/gradle/src/composeApp/build/dist/wasmJs/productionExecutable/ /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
compose
Copy code
version: '3.9'
services:
  kotlin-wasm-app:
    networks:
      - frontend
    container_name: test-app
    hostname: test-app
    restart: always
    build: .
    ports:
      - "8000:80"
    volumes:
      - ./:/codex

networks:
  frontend:
    name: custom_network
    driver: bridge
K 5
­čÜÇ 2
y
Can you please also share a demo repository which goes along with this
h
Yeah I can, if that helps anyone. I mean, it's out of the box koylin/wasm demo with two docker files slapped on top