Compare commits
	
		
			No commits in common. "ee8dfa4a9382a73d97c219cc2fe528aa38df641d" and "cef745b642f1528364d9e9cb73046bbd3ca06a79" have entirely different histories.
		
	
	
		
			ee8dfa4a93
			...
			cef745b642
		
	
		
							
								
								
									
										30
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,25 +1,5 @@ | |||||||
| ### General ### | target | ||||||
| private_repos/ | private_repos | ||||||
| 
 | log/ | ||||||
| ### Harmony ### | *.tgz | ||||||
| harmony.log | .gitignore | ||||||
| 
 |  | ||||||
| ### Helm ### |  | ||||||
| # Chart dependencies |  | ||||||
| **/charts/*.tgz |  | ||||||
| 
 |  | ||||||
| ### Rust ### |  | ||||||
| # Generated by Cargo |  | ||||||
| # will have compiled files and executables |  | ||||||
| debug/ |  | ||||||
| target/ |  | ||||||
| 
 |  | ||||||
| # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries |  | ||||||
| # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html |  | ||||||
| Cargo.lock |  | ||||||
| 
 |  | ||||||
| # These are backup files generated by rustfmt |  | ||||||
| **/*.rs.bk |  | ||||||
| 
 |  | ||||||
| # MSVC Windows builds of rustc generate these, which store debugging information |  | ||||||
| *.pdb |  | ||||||
|  | |||||||
							
								
								
									
										3
									
								
								examples/rust/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								examples/rust/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +0,0 @@ | |||||||
| Dockerfile.harmony |  | ||||||
| .harmony_generated |  | ||||||
| harmony |  | ||||||
| @ -22,7 +22,7 @@ async fn main() { | |||||||
|     let application = Arc::new(RustWebapp { |     let application = Arc::new(RustWebapp { | ||||||
|         name: "harmony-example-rust-webapp".to_string(), |         name: "harmony-example-rust-webapp".to_string(), | ||||||
|         domain: Url::Url(url::Url::parse("https://rustapp.harmony.example.com").unwrap()), |         domain: Url::Url(url::Url::parse("https://rustapp.harmony.example.com").unwrap()), | ||||||
|         project_root: PathBuf::from("./webapp"), // Relative from 'harmony-path' param
 |         project_root: PathBuf::from("./examples/rust/webapp"), | ||||||
|         framework: Some(RustWebFramework::Leptos), |         framework: Some(RustWebFramework::Leptos), | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
| @ -30,10 +30,10 @@ async fn main() { | |||||||
|         features: vec![ |         features: vec![ | ||||||
|             Box::new(ContinuousDelivery { |             Box::new(ContinuousDelivery { | ||||||
|                 application: application.clone(), |                 application: application.clone(), | ||||||
|             }), |             }), // TODO add monitoring, backups, multisite ha, etc
 | ||||||
|             Box::new(Monitoring { |             Box::new(Monitoring { | ||||||
|                 application: application.clone(), |                 application: application.clone(), | ||||||
|             }), // TODO: add backups, multisite ha, etc.
 |             }), | ||||||
|         ], |         ], | ||||||
|         application, |         application, | ||||||
|     }; |     }; | ||||||
|  | |||||||
							
								
								
									
										16
									
								
								examples/rust/webapp/Dockerfile.harmony
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								examples/rust/webapp/Dockerfile.harmony
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | |||||||
|  | FROM rust:bookworm as builder | ||||||
|  | RUN apt-get update && apt-get install -y --no-install-recommends clang wget && wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz && tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz && cp cargo-binstall /usr/local/cargo/bin && rm cargo-binstall-x86_64-unknown-linux-musl.tgz cargo-binstall && apt-get clean && rm -rf /var/lib/apt/lists/* | ||||||
|  | RUN cargo binstall cargo-leptos -y | ||||||
|  | RUN rustup target add wasm32-unknown-unknown | ||||||
|  | WORKDIR /app | ||||||
|  | COPY . . | ||||||
|  | RUN cargo leptos build --release -vv | ||||||
|  | FROM debian:bookworm-slim | ||||||
|  | RUN groupadd -r appgroup && useradd -r -s /bin/false -g appgroup appuser | ||||||
|  | ENV LEPTOS_SITE_ADDR=0.0.0.0:3000 | ||||||
|  | EXPOSE 3000/tcp | ||||||
|  | WORKDIR /home/appuser | ||||||
|  | COPY --from=builder /app/target/site/pkg /home/appuser/pkg | ||||||
|  | COPY --from=builder /app/target/release/harmony-example-rust-webapp /home/appuser/harmony-example-rust-webapp | ||||||
|  | USER appuser | ||||||
|  | CMD /home/appuser/harmony-example-rust-webapp | ||||||
| @ -157,7 +157,6 @@ async fn compile_harmony( | |||||||
| 
 | 
 | ||||||
|     let cargo_exists = Command::new("which") |     let cargo_exists = Command::new("which") | ||||||
|         .arg("cargo") |         .arg("cargo") | ||||||
|         .stdout(Stdio::null()) |  | ||||||
|         .status() |         .status() | ||||||
|         .expect("couldn't get `which cargo` status") |         .expect("couldn't get `which cargo` status") | ||||||
|         .success(); |         .success(); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user