fixed docker
This commit is contained in:
parent
84327e9786
commit
859c826599
15
compose.yaml
15
compose.yaml
@ -23,6 +23,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
website_net:
|
website_net:
|
||||||
ipv4_address: "88.88.5.2"
|
ipv4_address: "88.88.5.2"
|
||||||
|
|
||||||
expose:
|
expose:
|
||||||
- "8006"
|
- "8006"
|
||||||
|
|
||||||
@ -54,6 +55,20 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "19001:80"
|
- "19001:80"
|
||||||
|
|
||||||
|
website:
|
||||||
|
container_name: "site"
|
||||||
|
restart: always
|
||||||
|
build:
|
||||||
|
context: ./vvsite
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
|
networks:
|
||||||
|
website_net:
|
||||||
|
ipv4_address: "88.88.5.3"
|
||||||
|
|
||||||
|
expose:
|
||||||
|
- "3000"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
website_net:
|
website_net:
|
||||||
# external: false
|
# external: false
|
||||||
|
|||||||
BIN
minishell/minishell_src/bin/minishell
Executable file
BIN
minishell/minishell_src/bin/minishell
Executable file
Binary file not shown.
BIN
minishell/minishell_src/libft/libft.a
Normal file
BIN
minishell/minishell_src/libft/libft.a
Normal file
Binary file not shown.
@ -42,12 +42,8 @@ http {
|
|||||||
|
|
||||||
root /server;
|
root /server;
|
||||||
|
|
||||||
location / {
|
location /minishell/vnc {
|
||||||
index index.html;
|
proxy_pass http://minishell:8006/;
|
||||||
}
|
|
||||||
|
|
||||||
location /minishell {
|
|
||||||
proxy_pass http://88.88.5.2:8006/;
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
@ -55,6 +51,15 @@ http {
|
|||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
location / {
|
||||||
|
proxy_pass http://website:3000/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
# proxy_set_header Upgrade $http_upgrade;
|
||||||
|
# proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
#error_page 404 /404.html;
|
||||||
|
|
||||||
|
|||||||
9
run.sh
9
run.sh
@ -5,13 +5,18 @@ set -e
|
|||||||
# Compile the minishell project
|
# Compile the minishell project
|
||||||
make -C minishell/minishell_src
|
make -C minishell/minishell_src
|
||||||
|
|
||||||
|
# rebuild website
|
||||||
|
cd vvsite && cargo leptos build
|
||||||
|
cd ..
|
||||||
|
|
||||||
# stop containers if running
|
# stop containers if running
|
||||||
docker compose down -v
|
docker compose down -v
|
||||||
|
|
||||||
# remove volumes
|
# remove volumes
|
||||||
docker volume prune -f
|
docker volume prune -f
|
||||||
docker network rm website_website_net -f
|
|
||||||
docker rmi website-nginx
|
docker rmi website-website website-minishell website-nginx -f
|
||||||
|
|
||||||
|
|
||||||
# start the containers
|
# start the containers
|
||||||
docker compose up
|
docker compose up
|
||||||
|
|||||||
@ -55,7 +55,7 @@ tailwind-input-file = "assets/tailwind/tailwind.css"
|
|||||||
# Optional. Env: LEPTOS_ASSETS_DIR.
|
# Optional. Env: LEPTOS_ASSETS_DIR.
|
||||||
assets-dir = "assets/public"
|
assets-dir = "assets/public"
|
||||||
# The IP and port (ex: 127.0.0.1:3000) where the server serves the content. Use it in your server setup.
|
# The IP and port (ex: 127.0.0.1:3000) where the server serves the content. Use it in your server setup.
|
||||||
site-addr = "127.0.0.1:3000"
|
site-addr = "0.0.0.0:3000"
|
||||||
# The port to use for automatic reload monitoring
|
# The port to use for automatic reload monitoring
|
||||||
reload-port = 3001
|
reload-port = 3001
|
||||||
# [Optional] Command to use when running end2end tests. It will run in the end2end dir.
|
# [Optional] Command to use when running end2end tests. It will run in the end2end dir.
|
||||||
|
|||||||
10
vvsite/Dockerfile
Normal file
10
vvsite/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM archlinux
|
||||||
|
|
||||||
|
WORKDIR /website
|
||||||
|
COPY ./target/site /website/target/site
|
||||||
|
COPY ./target/debug/vvsite /website/vvsite
|
||||||
|
|
||||||
|
COPY ./Cargo.toml /website/Cargo.toml
|
||||||
|
RUN chmod +x /website/vvsite
|
||||||
|
|
||||||
|
CMD ["/website/vvsite"]
|
||||||
@ -7,7 +7,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
use leptos_actix::{generate_route_list, LeptosRoutes};
|
use leptos_actix::{generate_route_list, LeptosRoutes};
|
||||||
use vvsite::website::client::app::*;
|
use vvsite::website::client::app::*;
|
||||||
|
|
||||||
let conf = get_configuration(None).await.unwrap();
|
let conf = get_configuration(Some("Cargo.toml")).await.unwrap();
|
||||||
let addr = conf.leptos_options.site_addr;
|
let addr = conf.leptos_options.site_addr;
|
||||||
// Generate the list of routes in your Leptos App
|
// Generate the list of routes in your Leptos App
|
||||||
let routes = generate_route_list(App);
|
let routes = generate_route_list(App);
|
||||||
|
|||||||
@ -8,7 +8,7 @@ pub fn MinishellPage() -> impl IntoView{
|
|||||||
<div class="flex h-[8vh] place-content-stretch">
|
<div class="flex h-[8vh] place-content-stretch">
|
||||||
<h2 class="text-4xl py-8">"The (mini) Shell"</h2>
|
<h2 class="text-4xl py-8">"The (mini) Shell"</h2>
|
||||||
</div>
|
</div>
|
||||||
<iframe src="http://localhost:19001/minishell" class="place-self-center" width="800" height="600" />
|
<iframe src="http://127.0.0.1:19001/minishell/vnc" class="place-self-center" width="800" height="600" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user