30 Commits
Author SHA1 Message Date
marc 7d743f3f08 fix 2021-08-22 13:53:40 +00:00
marc 6653823fa5 tried to fix things for kompose 2021-08-22 13:46:52 +00:00
marc 83bcaeeebf no esclave 2 2021-08-22 12:45:36 +00:00
marc 7f217a03f1 mounting mcvnc_usr 2021-08-20 13:07:07 +02:00
marc 2df1fd1523 fixed minecraft aventure 2021-08-20 12:41:39 +02:00
marc bf73c033be minecraft aventure 2021-08-20 12:36:19 +02:00
marc c28bb5e784 trying to use registries 2021-08-14 21:15:01 +00:00
marc 26cba7455c no pipfile or requirements.txt 2021-08-14 16:13:56 +02:00
marc b439d91d0e updated requirements.txt to pipfile.lock 2021-08-14 14:09:44 +00:00
marc 82de650b79 enabling snooper to disable telemetry 2021-08-14 16:02:49 +02:00
marc 45aedd9b18 mcmyadmin 2021-08-09 21:11:12 +02:00
marc f247d44230 updated caddy 2021-08-09 11:47:48 +00:00
marc fda4e23f56 different bind mount for 1.17 2021-08-09 00:08:57 +02:00
marc 006d03d73b minecraft 2 worlds 2021-08-08 23:58:36 +02:00
marc d978697dad bind mounts 2021-08-08 21:06:41 +02:00
marc 62684f48ab valentin.marcpartensky.com 2021-08-05 21:24:47 +00:00
marc acf8946506 openldap 2021-08-04 15:18:01 +00:00
marc 56d184abd6 ram usage from 2g to 1g for minecraft server 2021-08-04 00:22:20 +00:00
marc 35ea64604f wordpress arnaud 2021-08-03 23:39:53 +00:00
marc 1c99af96d5 website dev 2021-08-03 12:38:10 +00:00
marc 0e2d47097f not init-letsencrypt.sh 2021-08-02 01:52:20 +00:00
marc 0461e0c08c giving more build context to todolist containers 2021-08-01 23:58:51 +00:00
marc 5a10741a91 exporting data.tgz.gpg 2021-08-01 22:40:18 +00:00
marc 948d189305 ssh honeypot 2021-08-01 22:26:36 +00:00
marc 4ea3335b19 thai wara 2021-08-01 21:21:50 +00:00
marc 2af6a89315 using caddy as reverse proxy cuz it does not fail me 2021-08-01 16:34:25 +00:00
marc cdf38224d1 wrong srv 2021-07-26 18:18:10 +02:00
marc ce26163993 .srv 2021-07-11 21:19:07 +02:00
marc 6c253f3d53 using relative links for everything 2021-07-07 13:40:52 +02:00
marc 859e081eb8 using .vol in home folder to store docker volumes 2021-06-14 09:51:35 +02:00
4 changed files with 401 additions and 212 deletions
+4 -6
View File
@@ -1,8 +1,6 @@
export:
tar cvzf /tmp/docker_data.tgz /root/docker/data
gpg --encrypt --recipient 'marc.partensky@gmail.com' /tmp/docker_data.tgz
mv /tmp/docker_data.tgz.gpg .
rm /tmp/docker_data.tgz
tar cvzf data.tgz data
gpg --encrypt --recipient 'marc.partensky@gmail.com' data.tgz
rm data.tgz
clean:
rm ./docker_data.tgz.gpg
rm /tmp/docker_data.tgz
rm data.tgz.gpg
+397 -126
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
-80
View File
@@ -1,80 +0,0 @@
#!/bin/bash
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'Error: docker-compose is not installed.' >&2
exit 1
fi
domains=(marcpartensky.com www.marcpartensky.com)
rsa_key_size=4096
data_path="./data/certbot"
email="" # Adding a valid address is strongly recommended
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
if [ -d "$data_path" ]; then
read -p "Existing data found for $domains. Continue and replace existing certificate? (y/N) " decision
if [ "$decision" != "Y" ] && [ "$decision" != "y" ]; then
exit
fi
fi
if [ ! -e "$data_path/conf/options-ssl-nginx.conf" ] || [ ! -e "$data_path/conf/ssl-dhparams.pem" ]; then
echo "### Downloading recommended TLS parameters ..."
mkdir -p "$data_path/conf"
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > "$data_path/conf/options-ssl-nginx.conf"
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem > "$data_path/conf/ssl-dhparams.pem"
echo
fi
echo "### Creating dummy certificate for $domains ..."
path="/etc/letsencrypt/live/$domains"
mkdir -p "$data_path/conf/live/$domains"
docker-compose run --rm --entrypoint "\
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
-keyout '$path/privkey.pem' \
-out '$path/fullchain.pem' \
-subj '/CN=localhost'" certbot
echo
echo "### Starting nginx ..."
docker-compose up --force-recreate -d nginx
echo
echo "### Deleting dummy certificate for $domains ..."
docker-compose run --rm --entrypoint "\
rm -Rf /etc/letsencrypt/live/$domains && \
rm -Rf /etc/letsencrypt/archive/$domains && \
rm -Rf /etc/letsencrypt/renewal/$domains.conf" certbot
echo
echo "### Requesting Let's Encrypt certificate for $domains ..."
#Join $domains to -d args
domain_args=""
for domain in "${domains[@]}"; do
domain_args="$domain_args -d $domain"
done
# Select appropriate email arg
case "$email" in
"") email_arg="--register-unsafely-without-email" ;;
*) email_arg="--email $email" ;;
esac
# Enable staging mode if needed
if [ $staging != "0" ]; then staging_arg="--staging"; fi
docker-compose run --rm --entrypoint "\
certbot certonly --webroot -w /var/www/certbot \
$staging_arg \
$email_arg \
$domain_args \
--rsa-key-size $rsa_key_size \
--agree-tos \
--force-renewal" certbot
echo
echo "### Reloading nginx ..."
docker-compose exec nginx nginx -s reload