mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-23 01:04:32 +07:00
Clean up
This commit is contained in:
parent
a49f018255
commit
f4eb269f9d
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
||||
[submodule "infra/pxe-server"]
|
||||
path = infra/pxe-server
|
||||
url = https://github.com/khuedoan/pxe-server
|
18
Makefile
18
Makefile
@ -1,18 +0,0 @@
|
||||
#TODO
|
||||
.POSIX:
|
||||
|
||||
default: help
|
||||
|
||||
help:
|
||||
@echo "Khue's homelab"
|
||||
|
||||
platform:
|
||||
cd ./platform \
|
||||
&& terraform init \
|
||||
&& terraform apply
|
||||
|
||||
apps:
|
||||
echo hello
|
||||
|
||||
reset-infra:
|
||||
./infra/scripts/reset.py
|
0
apps/README.md
Normal file
0
apps/README.md
Normal file
@ -1,11 +0,0 @@
|
||||
[package]
|
||||
name = "index"
|
||||
version = "0.1.0"
|
||||
authors = ["Khue Doan <khuedoan98@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
actix-web = "2.0"
|
||||
actix-rt = "1.0"
|
@ -1,25 +0,0 @@
|
||||
FROM rust:1.44.1-slim AS base
|
||||
|
||||
ENV USER=root
|
||||
|
||||
WORKDIR /usr/local/src/index/
|
||||
|
||||
RUN cargo init
|
||||
COPY ./Cargo.toml ./Cargo.toml
|
||||
RUN cargo fetch
|
||||
|
||||
COPY ./src/ ./src/
|
||||
|
||||
CMD [ "cargo", "test", "--offline" ]
|
||||
|
||||
FROM base AS builder
|
||||
|
||||
RUN cargo build --release --offline
|
||||
|
||||
FROM rust:1.44.1-slim
|
||||
|
||||
COPY --from=builder /usr/local/src/index/target/release/index /usr/local/bin/index
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/index" ]
|
@ -1,18 +0,0 @@
|
||||
use actix_web::{web, App, HttpRequest, HttpServer, Responder};
|
||||
|
||||
async fn greet(req: HttpRequest) -> impl Responder {
|
||||
let name = req.match_info().get("name").unwrap_or("World");
|
||||
format!("Hello {}!", &name)
|
||||
}
|
||||
|
||||
#[actix_rt::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
.route("/", web::get().to(greet))
|
||||
.route("/{name}", web::get().to(greet))
|
||||
})
|
||||
.bind("0.0.0.0:8000")?
|
||||
.run()
|
||||
.await
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
FROM alpine:3.12.0
|
||||
|
||||
ADD https://github.com/w4/bin/releases/download/v1.0.3/bin-v1.0.3-x86_64-unknown-linux-musl.tar.gz /tmp/
|
||||
|
||||
RUN tar -xvzf /tmp/bin-*.tar.gz -C /usr/local/bin/ && rm /tmp/bin-*.tar.gz
|
||||
|
||||
CMD [ "bin" ]
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker build -t khuedoan/khuedoan.com-nginx nginx/
|
||||
docker build -t khuedoan/khuedoan.com-index index/
|
||||
docker build -t khuedoan/khuedoan.com-gitea gitea/
|
||||
docker build -t khuedoan/khuedoan.com-mariadb mariadb/
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker push khuedoan/khuedoan.com-nginx
|
||||
docker push khuedoan/khuedoan.com-index
|
||||
docker push khuedoan/khuedoan.com-gitea
|
||||
docker push khuedoan/khuedoan.com-mariadb
|
1
docs/00_metal.md
Symbolic link
1
docs/00_metal.md
Symbolic link
@ -0,0 +1 @@
|
||||
../metal/README.md
|
1
docs/01_infra.md
Symbolic link
1
docs/01_infra.md
Symbolic link
@ -0,0 +1 @@
|
||||
../infra/README.md
|
1
docs/02_platform.md
Symbolic link
1
docs/02_platform.md
Symbolic link
@ -0,0 +1 @@
|
||||
../platform/README.md
|
1
docs/03_apps.md
Symbolic link
1
docs/03_apps.md
Symbolic link
@ -0,0 +1 @@
|
||||
../apps/README.md
|
0
infra/README.md
Normal file
0
infra/README.md
Normal file
@ -1 +0,0 @@
|
||||
Subproject commit 028f617e4dc9018182ec8d8c9fa26dfffd56522a
|
0
metal/README.md
Normal file
0
metal/README.md
Normal file
0
platform/README.md
Normal file
0
platform/README.md
Normal file
Loading…
Reference in New Issue
Block a user