Skip to content

Instantly share code, notes, and snippets.

View dnaprawa's full-sized avatar

Damian Naprawa dnaprawa

View GitHub Profile
@dnaprawa
dnaprawa / nginxproxy.md
Created May 13, 2021 05:50 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@dnaprawa
dnaprawa / README.md
Last active April 24, 2021 09:35
Elasticsearch with nginx proxy - Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
  name: elasticsearch
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: elasticsearch
  template:
@dnaprawa
dnaprawa / README.md
Last active March 5, 2024 20:00
Kubernetes Dashboard with Metrics Server

Install Kubernetes Dashboard

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml

Patch the dashboard to allow skipping login

kubectl patch deployment kubernetes-dashboard -n kubernetes-dashboard --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--enable-skip-login"}]'
@dnaprawa
dnaprawa / README.md
Created February 1, 2021 07:44
Install Docker & docker-compose on Ubuntu/Debian

Create a .sh file - eg. docker-install.sh and paste following:

#!/bin/bash

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
@dnaprawa
dnaprawa / docker-nfs-volumes.md
Created January 27, 2021 10:36 — forked from ruanbekker/docker-nfs-volumes.md
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
  mysql-test-1
@dnaprawa
dnaprawa / README.md
Last active June 10, 2024 17:09
Using Docker on remote Docker Host with docker context

Working on remote Docker Host using docker context

SSH keys on Windows

In order to use remote Docker host, as a prerequisite you need SSH enabled (required login using SSH keys).

Generate or find your public SSH key

Go to C:\Users\YOUR_USERNAME\.ssh and copy content of id_rsa.pub file

@dnaprawa
dnaprawa / minecraft-in-docker.md
Last active November 22, 2020 11:52
Running Minecraft Server using Docker (and docker-compose)

Running Minecraft Server using Docker (and docker-compose)

With over 126 million monthly users, 200 million games sold & 40 million MAU, Minecraft still remains one of the biggest games on the planet.

Why minecraft inside Docker?

  • for fun of course! :)
  • can be run locally for your kids
  • you can run it on popular and low-cost Rasperry PI inside your home and/or in the cloud
@dnaprawa
dnaprawa / README.md
Last active August 16, 2022 16:08
Apple M1 workaround for Docker

Apple M1 workaround for Docker

Prerequisites

You need a dedicated Linux machine (linux-vm) (in the cloud or on your VPS, or bare-metal) with Docker installed and SSH enabled (required login using SSH keys).

Workaround for people who have SSH access to a docker installed linux machine

Install go (pre-compiled binaries at https://golang.org/dl/

(Edit: there are no Darwin arm64 yet, You need to compile or use Homebrew...)

@dnaprawa
dnaprawa / docker-compose.yml
Created July 2, 2020 05:47
Sample YAML file to run MySQL & phpMyAdmin using Docker (docker-compose)
version: '3.7'
services:
phpmyadmin:
container_name: phpmyadmin
image: phpmyadmin/phpmyadmin:latest
restart: always
ports:
- 8081:80
# Publish Your App to the Internet using Ngrok