Skip to content

Instantly share code, notes, and snippets.

View pdonorio's full-sized avatar
🔍
searching...

Paolo D. pdonorio

🔍
searching...
View GitHub Profile
@pdonorio
pdonorio / Dockerfile
Last active June 25, 2022 19:20
Dockerfile best practices
###################
# 1. start with a small image (e.g. alpine OS)
FROM alpine:3.7
# or with the 'alpine' version of the official build
# FROM nginx:1.13.9-alpine
# 2. fix a tag to image version
###################
# 3. Provide info about who you are
@pdonorio
pdonorio / Dockerfile
Last active May 13, 2022 21:20
A template for best practices in writing a docker image
#######################
## BUILD BASE
# Small image
FROM alpine:3.5
# or
FROM ubuntu:16.04
# LTS
@pdonorio
pdonorio / README.md
Created April 17, 2020 21:16
Asyncio quick test

asyncio

Quick test/tutorial on concurrent tasks, based on asyncio.

@pdonorio
pdonorio / docker-compose.yml
Created February 3, 2020 22:14
Ghost 3 dockerized full-options blog
######################################
# Working ghost 3 dockerized blog, with:
# - dedicated mysql container
# - possible adminer for mysql
# - automatic SSL via letsencrypt
# (through traefik)
######################################
version: '3.7'
@pdonorio
pdonorio / Dockerfile
Last active January 31, 2020 22:58
Poetry packaging inside docker container
ARG PYTHON_RELEASE
FROM python:${PYTHON_RELEASE}-alpine
ENV POETRY_VERSION=1.0.3 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
RUN apk update \
&& apk add --no-cache --virtual build-deps \

Keybase proof

I hereby claim:

  • I am pdonorio on github.
  • I am pdonorio (https://keybase.io/pdonorio) on keybase.
  • I have a public key ASBU_D4mTbKTomZqk-H-j4EeYUkXea0UkOOLmTPxk4DlhQo

To claim this, I am signing this object:

@pdonorio
pdonorio / README.md
Last active July 22, 2019 00:53
[PoC] Subscriptions in a REST API environment

Proof of Concept with web Subscriptions

Based on a question on reddit about rethinkdb we decided to test socket.io.

The PoC is executed on a docker container environment. My current nodejs image is based on alpine and contains also the rethinkdb javascript driver and socket.io.

The directory you are in should contain the javascript files below. Important: app.js has to be inside a directory called js.

@pdonorio
pdonorio / box_plots.ipynb
Created April 26, 2019 21:25
Testing plots
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pdonorio
pdonorio / .env
Created November 1, 2018 14:36
Postgresql docker-python playground
POSTGRESQL_VERSION=11.0
PYTHON_VERSION=3.7
PYLIBS=psycopg2-binary sqlalchemy ipython
POSTGRES_DB=debugging
POSTGRES_HOST=docker-postgresql
POSTGRES_ROOT_USER=postgres
POSTGRES_USER=docker
POSTGRES_PASSWORD=verylongpassword
POSTGRES_PORT=5432
@pdonorio
pdonorio / Dockerfile
Created September 14, 2018 17:51
Doctl docker image base
FROM alpine:3.8
ENV DOCTL_VERSION=1.9.0
RUN apk add --no-cache curl
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
WORKDIR /usr/local/bin
ENV GITURL https://github.com/digitalocean/doctl/releases/download
RUN curl -L \
$GITURL/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.tar.gz \