Giter VIP home page Giter VIP logo

make_a_container's Introduction

230831

The goal of this project is simply to create a container which runs a website.

230901

It has been difficult to make the dockerfile work. I wanted to use RHEL UBI images but didn't want to install all of Rust's dependencies. So I split the file into a builder image and a run image. Having a lot of trouble installing Dioxus on the Rust image and running dioxus build. Installing it via a RUN command doesn't seem to add the dioxus executable to the path.

Bruh. Dioxus changed their CLI to be named dx but their docs aren't updated. On my local machine I have an old version of dioxus-cli so my local command is dioxus.

230903

Anyway, The resultant .wasm file wasn't runnable by its own. I tried to run it via Wasmtime and it failed. Then I realized I had no idea how Dioxus is supposed to be used in production. Trunk is used to take your app and compile it into HTTP, CSS, and WASM, so it can be served like any other page. Except Dioxus build already compiles the project into a distributable format. Trunk is used just to serve it? Tried installing apache2 locally, but setting up the environment variables was too much of a pain for me. Luckily, there is a docker image which does all that for me.

230906

Worked on this for an hour yesterday mainly trying to figure out why trunk serve wasn't working locally. I reached out on the Dioxus discord for help, and a guy told me to use SSR. The problem is I don't want to use a HTTP library like Axum, I want to use a production web server(Apache2). But Apache2 was still showing a blank page with the index.html's header tag working but no generated code. I tried swapping out trunk with Dioxus going against the doc recommendations but at least Dioxus worked locally. But it took a while to compile, and I wasn't sure that using Dioxus serve was production grade for my test site of no users.

Anyway, I figured it out with a lot of trial and error this morning. I finally tried compiling with Dioxus build, copying the output to Apache2, and it WORKED. IDK why the docs recommended trunk, it seemed not compatible with Dioxus.

make_a_container's People

Contributors

mach1212 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.