node enc.mjs
node dec.mjs
Dockerfile | |
target | |
.git | |
.env |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: nginx-test-config | |
data: | |
nginx.conf: | | |
worker_processes 1; | |
error_log /dev/stdout info; |
# ansible hosts | |
all: | |
children: | |
project-servers: | |
hosts: | |
ingress: | |
ansible_user: ubuntu | |
ansible_host: 192.168.9.12 # replace by internal ip | |
app: |
mkdir -p ~/.vim/autoload | |
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
echo " | |
call plug#begin('~/.vim/plugged') | |
Plug 'editorconfig/editorconfig-vim' | |
call plug#end() | |
" >> ~/.vimrc | |
vim +PlugInstall editorconfig-vim +qall |
## Setup | |
DOMAIN=example.com #! change it | |
[email protected] #! change it | |
STACK=my | |
WEBROOT=${STACK}_letsencrypt_webroot_data:/etc/letsencrypt_webroot | |
DATA=${STACK}_letsencrypt_data:/etc/letsencrypt | |
## Request certificates | |
docker run --rm -v $WEBROOT -v $DATA certbot/certbot certonly --webroot --webroot-path /etc/letsencrypt_webroot -d $DOMAIN -m $EMAIL --agree-tos |
## Setup | |
STACK=my | |
WEBROOT=${STACK}_letsencrypt_webroot_data:/etc/letsencrypt_webroot | |
DATA=${STACK}_letsencrypt_data:/etc/letsencrypt | |
SERVICE=${STACK}_nginx-front | |
## Request renew | |
docker run --rm -v $WEBROOT -v $DATA certbot/certbot renew | |
## Update all certificates in nginx service or you can use grep `$(ls /etc/letsencrypt/live/ | grep some-domain)` |
version: '3.6' | |
services: | |
custom-service: | |
image: registry.example.com/custom-service:latest | |
build: | |
context: ./custom-service |
upstream custom-service-upstream { | |
server custom-service:80; | |
} | |
server { | |
listen 8080; | |
server_name example.com; | |
location / { | |
return 301 https://$host$request_uri; |
upstream registry-upstream { | |
server registry:5000; | |
} | |
map $upstream_http_docker_distribution_api_version $docker_distribution_api_version { | |
'' 'registry/2.0'; | |
} | |
server { | |
listen 8443 ssl http2; |