$ cat <<EOT > docker-compose.yaml
version: "3"
services:
runner:
image: gitlab/gitlab-runner
restart: unless-stopped
entrypoint:
- /bin/sh
- -c$ cat <<EOF > nginx.conf
server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html;
location / {The set lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefailis short for:
set -e
set -u
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| server_name stream.example.com; | |
| listen 443 ssl http2; # managed by Certbot | |
| ssl_certificate /etc/letsencrypt/live/stream.example.com/fullchain.pem; # managed by Certbot | |
| ssl_certificate_key /etc/letsencrypt/live/stream.example.com/privkey.pem; # managed by Certbot | |
| include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
| ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | |
| ###### Jellyfin - Reverse Proxy Recommended Config Start (https://jellyfin.org/docs/general/networking/nginx.html) ###### | |
| add_header Strict-Transport-Security "max-age=31536000" always; |
package_data copy the files into Python site-packages level directory.
data_files copy the files into System-wide level directory.
install_requires install the library dependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| see: https://gist.github.com/UniIsland/3346170 | |
| """ | |
Create a MongoDB Replica set with 3 members on local machine with Docker
- MongoDB Replica Set are inspired and based on the official tutorial
- We assume you already knew how to use Docker
- We'll use the following DNS hostnames
www.r0.mongodb.my www.r1.mongodb.my