Compare commits
5 commits
f7a12c3e11
...
ce3b0156f0
Author | SHA1 | Date | |
---|---|---|---|
ce3b0156f0 | |||
0fc4a5bfd0 | |||
cb3c93a4f7 | |||
a1363c0c25 | |||
dc504ab035 |
8 changed files with 87 additions and 22 deletions
26
containers/collective_score_rust_server.fish
Executable file
26
containers/collective_score_rust_server.fish
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set -l container_name collective-score-rust-server
|
||||
set -l container_volumes_dir ~/volumes/$container_name
|
||||
|
||||
buildah build -t $container_name:latest ~/code/collective-score
|
||||
|
||||
set -l db_container_name collective-score-rust-server-db
|
||||
set -l db_container_volumes_dir $container_volumes_dir/db
|
||||
set -l db_env_file $container_volumes_dir/.postgres.env
|
||||
|
||||
podman-default-create \
|
||||
$db_container_name \
|
||||
--network traefik \
|
||||
-v $db_container_volumes_dir:/var/lib/postgresql/data:Z \
|
||||
-e TZ=Europe/Berlin \
|
||||
-e PGTZ=Europe/Berlin \
|
||||
--env-file $db_env_file \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/library/postgres:15-alpine
|
||||
|
||||
podman-default-create \
|
||||
$container_name \
|
||||
--network traefik \
|
||||
-v $container_volumes_dir/data:/volumes/data:Z \
|
||||
localhost/$container_name:latest
|
|
@ -1,10 +1,20 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set -l container_name mo8it_com
|
||||
set -l container_name mo8it-com
|
||||
|
||||
buildah build --layers -t $container_name:latest ~/code/mo8it.com
|
||||
mkdir -p ~/volumes/$container_name
|
||||
|
||||
podman run \
|
||||
--rm \
|
||||
-v ~/code/mo8it.com:/volumes/src:Z,ro \
|
||||
-v ~/volumes/$container_name:/volumes/public:Z \
|
||||
-w /volumes/src \
|
||||
ghcr.io/getzola/zola:v0.17.2 build -o /volumes/public -f; or return 1
|
||||
|
||||
podman-default-create \
|
||||
$container_name \
|
||||
--network traefik \
|
||||
localhost/$container_name:latest
|
||||
-v ~/sync/volumes/nginx.conf:/etc/nginx/nginx.conf:z,ro \
|
||||
-v ~/volumes/$container_name:/usr/share/nginx/html:Z,ro \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/library/nginx:alpine
|
||||
|
|
|
@ -23,7 +23,7 @@ podman-default-create \
|
|||
-v $db_container_dir:/var/lib/postgresql/data:Z \
|
||||
--env-file $db_env_file \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/library/postgres:15-alpine
|
||||
docker.io/library/postgres:15-alpine; or return 1
|
||||
|
||||
podman-default-create \
|
||||
$container_name \
|
||||
|
@ -32,4 +32,4 @@ podman-default-create \
|
|||
-e POSTGRES_HOST=$db_container_name \
|
||||
--env-file $db_env_file \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/library/nextcloud:26-apache
|
||||
docker.io/library/nextcloud:27-apache
|
||||
|
|
|
@ -8,9 +8,7 @@ set -l certs_dir $container_volumes_dir/certs
|
|||
mkdir -p $logs_dir
|
||||
mkdir -p $certs_dir
|
||||
|
||||
if not podman network exists traefik
|
||||
podman network create traefik
|
||||
end
|
||||
podman network create --ignore traefik; or return 1
|
||||
|
||||
podman-default-create \
|
||||
$container_name \
|
||||
|
|
36
volumes/nginx.conf
Normal file
36
volumes/nginx.conf
Normal file
|
@ -0,0 +1,36 @@
|
|||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
charset utf-8;
|
||||
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
||||
gzip on;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name how-to-linux.mo8it.com;
|
||||
|
||||
location / {
|
||||
root /volumes/sites/how-to-linux.mo8it.com;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
}
|
|
@ -124,6 +124,9 @@ http:
|
|||
to_collective_score:
|
||||
rule: Host(`collective-score.mo8it.com`)
|
||||
service: collective_score
|
||||
to_collective_score_rust:
|
||||
rule: Host(`collective-score-rust.mo8it.com`)
|
||||
service: collective_score_rust
|
||||
{{ $n_ttyds := 28 }}
|
||||
{{ range $index, $num := until $n_ttyds }}
|
||||
to_ttyd{{ $num }}:
|
||||
|
@ -133,7 +136,6 @@ http:
|
|||
certResolver: le
|
||||
{{ end }}
|
||||
|
||||
|
||||
services:
|
||||
nginx:
|
||||
loadBalancer:
|
||||
|
@ -190,7 +192,7 @@ http:
|
|||
mo8it_com:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://mo8it_com
|
||||
- url: http://mo8it-com
|
||||
juna_li_com:
|
||||
loadBalancer:
|
||||
servers:
|
||||
|
@ -215,6 +217,10 @@ http:
|
|||
loadBalancer:
|
||||
servers:
|
||||
- url: http://collective-score-server
|
||||
collective_score_rust:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://collective-score-rust-server
|
||||
{{ range $index, $num := until $n_ttyds }}
|
||||
ttyd{{ $num }}:
|
||||
loadBalancer:
|
||||
|
|
|
@ -30,7 +30,7 @@ certificatesResolvers:
|
|||
|
||||
accessLog:
|
||||
filePath: /volumes/logs/access.log
|
||||
bufferingSize: 100
|
||||
bufferingSize: 128
|
||||
|
||||
providers:
|
||||
file:
|
||||
|
|
Loading…
Reference in a new issue