Spin up a WordPress Instance with Docker/Docker-Compose

Ever needed a fast way to spin up a fresh instance of WordPress to try something out or to have your personal local dev environment?

Update 2019-09-20: You want to access the htdocs Folder of your WordPress via a SMB/SAMBA/Windows share?

You have Docker & Docker-Compose installed on your machine?

Excellent – just do the following

Setup docker-compose.yml

  • Create a new directory, eg. “wp-dev-docker
  • Inside it – create a new file called “docker-compose.yml” with the following content
version: '3.7'


    image: wordpress
    restart: always
      - 8080:80
      - wp_data_volume:/var/www/html:z
      - default

    image: mysql:5.7
    restart: always
      MYSQL_ROOT_PASSWORD: yolo123
      - default

    image: dperson/samba
      - default
      GROUPID: 0
      USERID: 0
      - 139:139
      - 445:445
      - /tmp
    restart: unless-stopped
    stdin_open: true
    tty: true
      - wp_data_volume:/mnt:rw
    command: '-s "wpshare;/mnt;yes;no;no;wpshare" -u "wpshare;wpshare"'

  • Open your terminal inside your previously created directory and execute
> docker-compose up -d

Access via SMB/SAMBA/Windows share

While your instance is running you can also access the WordPress files inside the htdocs-folder of your container via a SMB/Samba/Windows share. Just connect to

Share: //localhost/wpshare
User: wpshare
Password: wpshare

Hint for MacOS-Users: Connecting via “Go” -” Connect to server” leads to the error “This file server is available on your computer. Access the volumes and files locally”. Mount the share via the following commands:

> mkdir wpshare
> mount_smbfs //wpshare:wpshare@localhost/wpshare wpshare/

Linux users might use this command to mount the share:

> mount -t cifs -o user=wpshare "//localhost/wpshare" wpshare/

Important: If you ever plan to use (parts of) this docker-compose.yml file in production/publicly remember to change the passwords of WORDPRESS_DB_PASSWORD, MYSQL_ROOT_PASSWORD and wpshare/wpshare!

Further usefull Docker commands:

> docker-compose logs -f   # shows log output of both wordpress+mysql containers
> docker-compose stop      # stops the containers without removing them
> docker-compose down      # stops the containers and removes them
> docker-compose images    # shows list of both containers 
> docker volume ls         # shows a list of your current volumes
> docker volume inspect abexdxdddd # shows meta info about a specific volume
> docker volume rm abexdxdddd        # removes volume with given name - CAREFULL! this is where the data of your containers is stored

Building your own encrypted LoRa infrastructure

Lately I discovered these nice little LoRa boards that make it possible to transmit data over the air on an open frequency without the need to have an extra SIM-card and a cellular data network. They promise up to 10km range so I knew that this would be my new playground :-)

Basically with LoRa you just send out data in clear-text on a predefined channel and everyone else that listens on that channel can read it. Not very safe. Actually not safe at at.

I also learned about LoRaWan that already solves a lot of these problems – especially encryption, addressing and lots more. But at the place where I wanted to deploy LoRa is no LoRaWan coverage and I also did not want to buy+operate a LoRaWan gateway there.

So I decided to build my own LoRa infrastructure. It consists of some nodes sending data via LoRa and another node (my “LoRa Gateway”) listening to them and forwarding the data to my web-backend via WiFi.

Outline of my LoRa infrastructure

I’m using the ESP8266-12 modules programmed via Arduino on both sides as there is already a broad variety of libraries and a big and helping community.

After initial data transmission from the sensor-node to the web-backend finally was working I started to play around with encrypting the payload. There are already a lot of libraries to encrypt and decrypt data on the Arduino that work great. But I did not find a lot of examples to encrypt on the Arduino and decrypt on a webserver.

One that was quite promising was the one that I found here: https://github.com/kakopappa/arduino-esp8266-aes-encryption-with-nodejs. It uses AES-128-CBC and was the first example project that I got working for my requirement to encrypt on the ESP8266 and decrypt on another platform – a big thanks to https://github.com/kakopappa :-)

The only problem was that it is using nodejs to decrypt the data but my webhost only supports php. So I wrote a php-port of the decryption part:

function decryptAes($aesKey, $ivB64, $msgB64){
		$plain_iv = bin2hex(base64_decode($ivB64));
		$iv = hex2bin($plain_iv);
		$key = hex2bin($aesKey);
		$bytes = openssl_decrypt($msgB64, "AES-128-CBC", $key, $options=0, $iv);
		$plaintext = base64_encode($bytes);
		$decoded_b64msg = base64_decode($plaintext, true);
		return base64_decode($decoded_b64msg, true);

Sample usage:

	$aesKey = "2B7E151628AED2A6ABF7158809CF4F3C";
	$ivB64 = "iv-in-base64"; 
	$msgB64 = "msg-in-base64";
	$decryptedMsg = decryptAes($aesKey, $ivB64, $msgB64);
	echo $decryptedMsg;

Of course you need to change the $aesKey to the one you have used. The key you see here is the same as in the library of https://github.com/kakopappa. The key is defined as a HEX-String, the IV and message are given Base64-Encoded.

Literal youTUBE TV

To meet the nerdy me in me I created this “literal youTUBE TV”.
I found this super retro/vintage CRT of the Austrian brand Kapsch on the flea market (it even came with a receipt of 1977) and as it uses just RF as input it is basically worthless as TV-stations only broadcast digitally nowadays.
But… you can buy an HDMI-to-RF transmitter which does exactly that: Converting your HDMI-signal to RF that can be injected instead of an antenna signal. After that you just have to plug a Chromecast or whatever HDMI outputting device into it and you have upcycled your old CRT.
Sweet, isn’t it?

  • Kapsch VIENNASTAR CRT, built 1977
  • AIYIMA Transmitter HDMI To RF (find it in your fav. chinese retailer)
  • Google Chromecast
  • Some wiring and setting up

Big thanks to my father who – as a former TV and radio mechanic – took care of adjusting and maintaining the CRT.

E-Ink Weatherstation

I had an old Tolino Shine E-Reader lying around that I did not want to throw out just because I did not use it anymore. After I found out it ran on Android and there is a way to root it I new I had to give it a new life. So I rooted it and created a mini-app that regularly pulls the current weather conditions and displays them. Furthermore I included a button to show current departure times of public transportation around my flat.


Pixeltable Reloaded

You might already know my Pixel-Table from a previous blog post (link). Back then it was powered by a Raspberry PI which had the hazards of managing a full OS and struggling with always-corrupted filesystems after power outages or just after some time when the SD card memory gets broken as of too many write-cycles.

So I started to move the hardware towards Arduino (to control the LED Stripe) and an ESP8266 to offer wifi communication. The two microcontrollers communicate via the serial interface.

Basic outline:
Webapp -> ((Wifi)) -> ESP8266 -> (Serial Interface) -> Arduino -> LED Stripe

Finally I also managed to build a grid for the LEDs so they appear far more pixel-shaped.


  • Pixeltable Hardware as of previous post
  • Arduino Nano
  • ESP8266
  • DIY Webapp to send commands to ESP8266
  • Fun!

Hobbyking Swamp Dawg Air Boat

After I saw the Hobbyking Swamp Dawg Air Boat somewhere on the internet I knew I also had to have one. So I ordered, assembled and ran it. Unfortunately the rumors were true that the motor and propeller it came with is sh*t. So after some rides I upgraded it with components that were recommended in a specific blog (Link).

It now runs mega-fast and with almost no vibrations.


  • Hobbyking Swamp Dawg Air Boat (Link)
  • Some RC sender and receiver
  • Turnigy D2826-6 2200kv Brushless Motor incl. spinner (Upgrade)
  • 30A SimonK 2-4s Brushless Speed Control ESC With BEC 3a (Upgrade)
  • Graupner CAM Speed Prop 5,5×4,3 (Upgrade)

DIY industrial design desktop

This is the desktop I designed and created for my living-room homeoffice corner. I had the idea to design it in industrial style and therefore used standard shawl panels that you normally use for concrete formworks. Especially I like the layered texture of the panels and the visible screws!

I also mounted some AC outlets on the surface so I do not have any annoying cables lying around that normally just act as dust attractors.

My latest addition to the table are USB outlets so I can also charge my mobile devices directly.


  • DokaPly Birch Plates (Link)
  • Some nice-looking AC outlets
  • IKEA RÄLLEN – Integrated USB Charger (Link)

Geeky weeding present


My friends Tobias and Anna got married and as usual I did not have any ideas for a present for a long time. But then I was playing around with the ESP8266 modules in a quiet minute I had a cool idea: As Tobias was the one that brought me to Arduinos & electronics the idea was born to program an ESP8266 to deliver the present:

Once connected to the ESP acting as an AP there should be a catch-all website (“Captive Portal”) giving the lucky couple some nice wedding ascii-art and the present in form of a coupon code. First I wanted to buy some (parts of) bitcoins to give them as a present. Unfortunately I did not have enough time to figure out how bitcoins work and especially how I could buy them to give them away like a coupon code. That is why I ended up using an unexciting amazon coupon code.

Then I mounted everything in a cigar box I had lying around and even supplied instant power using two AA batteries. So to open their present they now just have to power of the ESP8266 and connect to the wedding-wifi. On usual hardware the “captive portal” pops up with the custom wedding greetings and the present. And as the ESP is not soldered directly he can easily reuse the mcu.

I think it this the right way to give an electrical engineer his weeding present. Happy wedding, Tobias!

I just slightly changed the sources I found for the ESP8266 Captive Portal project, so I will not publish any sources here.

Repairing an htc desire 626g+

Right a month after my sister got a new htc desire 626g+ it dropped on the floor leaving it with a broken screen and a dead touchscreen. unless you do not repair it it came useless. So I tried my best – and voilá it is working again.

I bought a replacement (readily assembled display including touch screen digitizer) on ebay and worked my way through until I could replace the screen. As I could not find any tutorials on the internet yet I want to share my experience here.

My lessons to repair:

  • Open the back cover of the phone
  • Remove the surrounding frame. It can be removed with a plektron in the gap between the frame and the front cover
  • Remove all screws on the back and carefully remove the plastic covering the electronics
  • Now you can also remove the battery. It is glued with doublesided tape. Start by lifting it on the side that points to the usb plug. Then unplug the battery connector.
  • Disconnect the two flex cables of the old display. You can see which cables they are when you already have your new display.
  • In the battery compartment is a hole that let’s you see to the back side of the display.
  • Now pick a hairdryer and warm up the front glass of the phone and try to get out the old display element. As it did not work so well for me I just destroyed the glass (actually it was already defective as it was split) and picked out the display partly until I had everything out.
  • Then I cleaned the frame where the old display was taped and inserted the new display with new tape.
  • Connect the cables and assemble everything again.
  • I was happy that it booted up and everything worked.
  • Be carefully and never use too much force. When doing so, you will definitely destroy something! All parts _can_ be removed without too much force and without destroying them (except for the display unit that I did not care about as it was already broken :-)

Here are some pictures showing the insides of the phone. Maybe it can help you repairing your own phone.


IMG_20150817_210948 IMG_20150817_210952 IMG_20150817_211004 IMG_20150817_211009 IMG_20150818_210313 IMG_20150818_210328

Time Measurement for Carrera Slot Car Track

After I had to have my own Carrera slot car track last year I soon wanted to have proper time measurement. First we measured time with a stopwatch app on the mobile – one driving the slot car and another one taking the time. But of course it is inaccurate and it was more and more becoming inaccurate as the night proceeded to fall – blame it on sleepiness, the beer or both *twinker!*

So I began to experiment with the MicroView – my first thing on Kickstarter I actually supported. It comes with an integrated OLED display and is fully Arduino compatible. To document the times I connected a mini thermal printer. I also added some push buttons to change the number of laps for one race and the number of players. Pressing this button changes the current player and the measured time is than properly assigned when it comes to printing the result.


  • MicroView
  • Mini Thermal Printer + thermal paper
  • Infrared Obstacle Avoidance Sensor
  • 5v switching power supply (Minimum 2 Ampere suggested for printer)

See it in action in the video:

My Pixel-Coffee-Table

I was inspired for this project by the following post I saw on the web: How To Control Adafruit LED Pixels with Raspberry Pi

It explains how you can connect a bunch of WS2801 LEDs to a Raspberry Pi and control it via a web page running on the same small computer. I changed the form factor from pixelstrip-only to a 10×10 matrix of LEDs and added a wooden coffee table and a depolished glass plate around.

It has the same software as in the project mentioned above: Some node.js magic running the web interface and controlling the pixel strip. Big thumbs up tho Andrew Munsell for publishing his sources on Github!

I have a lot of other ideas concerning how to develop the table further:

  • responsive web interface so that it is also nicely usable on mobile devices
  • adding games like Connect 4 or Ludo
  • visualize audio that is heard around
  • visualize data coming from Twitter
  • visualize weather
  • and so on

But at least the hardware is up and running – the rest is software :)

As I use my table next to my sofa I also mounted a normal power outlet to being able to give my laptop some juice and also added two 5V USB power outlets to charge my mobile devices.

So my coffee table will provide the light fx at my next party – and my guests can charge their phone when they run out of battery as they are just taking pictures of my table :-D

[Update 2014-12-02] first idea to use my table:  advent wreath

Making a home for my trinkets, keys and everything else lying around

After I had seen the idea to use small spoons as hangers during my stay in Finland I knew I wanted that too. So I checked some old spoons at the fleamarket, got an old wooden board and voilá! Finally a stylish place for my seldom used things!

Fixing my broken Nexus 4

Got my broken Nexus 4 fixed.

I ordered a new display+glass+touch+frame unit on ebay and watched some video tutorials on Youtube. Was easier than expected.

Welcome back!

Cost: approx. 45eur (including shipping) + 1 hour of work + about 2 hours watching tutorials on Youtube.

Upgrading a vintage tube radio to support Bluetooth A2DP

My old tube radio has a gramophone input that acts like an auxiliary in. There I injected the audio output of a cheap 9$ bluetooth A2DP audio receiver from china (dealextreme) and connected a standard 5V power supply unit which is switched on together with the radio. This way I got my personal handmade bluetooth speaker. I really like the warm sound of these old radios and feeding it with a modern cell phone feels just super cool.

Attention: Be careful if you also want to upgrade an old radio! Most of them run directly on 230V. Be sure you know what you do!

This project also shows some sort of implicit critics against the just-so-common planned obsolescence. Do you think the stereo you bought just a couple of months ago will still work in 50 years? I guess not.

Botman – my homegrown home automater

My home automator – nicknamed “Botman” – has some nice features:

  • Indoor data: shows the current room temperature, humidity and barometric pressure on the display (1st row)
  • Outdoor weather: regularly requests current weather conditions from a weather API and displays them on the display (2nd row) and moves the servo arm to what we normally call the “weather icon”
  • Public transportation info: current departure times of public transport options around my flat are pulled from the web allowing me to better schedule when I have to leave my flat.
  • Archive indoor conditions: temperature, humidity and barometric pressure are regularly sent to a Google Spreadsheet to archive and visualize the data over time.
  • Android App: allows me to check the current data and lets me switch my remote controlled outlets on and off.

Technical overview:

  • Arduino Ethernet acting as a web server but also as web client when it pulls data from APIs.
  • I2C Display (lcm1602)
  • Laser cut dashboard (thanks to metalab.at)
  • Servo arm showing current weather forecast
  • Wooden self built enclosure
  • Temperature, barometric pressure, humidity sensor (BMP085, DHT11)
  • 433MHz wireless sender for remotely controlled outlets

As you might know the Arduino does not have a lot of memory. So parsing current JSON APIs might be a big pain in the *** or would simply not be possible – e.g. due to unsupported https connections. That is why I have installed a separate Google App Engine instance which does all the hard work and only returns the small data chunks I really need on the Arduino.

Of course security is always a big issue when it comes to home automation. All the data is transported on an unencrypted standard http connection. At the moment I can cope with this imperfect approach.


  • This is the first project I moved to the Arduino browser based IDE  codebender. It really helps me to save plenty of time as I do not have the hassles of setting up the Arduino IDE with all the proper libraries. Perfect for people who tend to experiment a lot or switch their dev. machine too often :)


  • make a better hand for the pointer of the weather icon
  • prepared to control door opener of house
  • prepared to add Ir diode to control any device with an Ir remote

My look of the defuseable clock

After I saw the nootropic design defuseable clock on the web somewhere I knew I also had to have one. This is how I styled my alarm clock.

Looks dangerous enough to get me out of bed in the morning? Unfortunately no.

Want to see how others have built and styled their defuseable clock? See it here!