Running WordPress and MySql in Docker

Notes

  • A Docker image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. Available for both #Linux and #Windows based apps, containerized software will always run the same, regardless of the environment. #Containers isolate software from its surroundings, for example differences between development and staging environments and help reduce conflicts between teams running different software on the same infrastructure.
  • A container is a runtime instance of an image—what the image becomes in memory when actually executed. It runs completely isolated from the host environment by default, only accessing host files and ports if configured to do so. #Container are stateless and should be considered read only! (you can go inside the container change data, but at container creation your changes are lost)
  • Both MYSQL (Data, users) and WordPress (plugins, themes, uploads) are stateful, so we have to use #Docker volume to persist data across container restart.
  • expose: 3306 will let you connect later with MySQLWorbench to the port from outside of the container. it is optional.
  • depends_on tell #wordpress to wait till mysql db container is up
  • The always restart policy tells #Docker to restart the container under every circumstance. What’s great about the always restart policy is that even if our #Docker host was to crash on boot, the Docker service will restart our container.

We will be using the official #Wordpress image from Docker HUB But first let’s create a file uploads.ini to avoid issues later on while uploading plugins in wordpress.

file_uploads = On 
memory_limit = 256M 
upload_max_filesize = 256M 
post_max_size = 300M 
max_execution_time = 600 

Create a new file docker-compose.yml, adapt values to your liking, especially all passwords and username. Note that #MYSQL and #Worpress data are persisted OUTSIDE of container.

version: '2' 
services: 
 wordpress: 
	depends_on: 
	 - db 
	image: wordpress:latest 
	volumes: 
	 - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini 
	 - ./file-wordpress:/var/www/html 
	ports: 
	 - 80:80 
	 - 443:443 
	restart: always 
	environment: 
	  WORDPRESS_DB_HOST: db 
	  WORDPRESS_DB_USER: wordpress 
	  WORDPRESS_DB_PASSWORD: wordpress 
	  WORDPRESS_TABLE_PREFIX: abcd 
 db: 
	image: mysql:5.7 
	volumes: 
	 - ./db-wordpress:/var/lib/mysql 
	restart: always 
	expose: 
	 - "3306" 
	environment: 
	  MYSQL_ROOT_PASSWORD: wordpress 
	  MYSQL_DATABASE: wordpress 
	  MYSQL_USER: wordpress 
	  MYSQL_PASSWORD: wordpress

The docker-compose up command aggregates the output of each container. It Builds, (re)creates, starts, and attaches to containers for a service. When the command exits, all containers are stopped. Running docker-compose up -d starts the containers in the background and leaves them running. To start WordPress in the background

docker-compose up -d

To find the name of the container

docker ps -a

or

docker-compose ps

To read the logs file

docker logs wordpress docker logs db

To go inside the container (remember all changes in there are lost at container restart)

docker exec -it wordpress bash

To delete all volume

docker-compose  rm -v

Get more speed with your MAVEN2 build

We had serious performance problems with MAVEN in our environment. It seems to be a recurrent problem
for MAVEN… anyway I did came through the following changes…the 2.0.9.db1 #Maven2 patch make really
Maven fly!

General settings to speed up #Maven:

  • More memory for #Maven process, change the launcher of eclipse to set MAVEN_OPTS like this:
    -DMAVEN_OPTS=”-Xms64m –Xmx128m”
  • Use the latest version of #Maven, but be careful of regressions! the latest as for today is 2.0.9
  • There is a patch available for #Maven 2.0.9, which speed up build by 40%. It is just simply day and
    night! try it, you’ll love it! Basically Don Brown alter MAVEN2 2.0.9 to

General settings to speed up #Eclipse:

  1. Use javaw.exe to start eclipse and not java.exe (more for console base program with a lot of feedback),
    while javaw.exe is more for graphical environment.
  2. Aggressive JIT and double core processors should use:
    -XX:-UseParallelGC -XX:+AggressiveOpts -XX:-UseConcMarkSweepGC -XX:+UseFastAccessorMethods
  3. Give more memory, MORE MEMORY for eclipse, on a 4GB machine, these are my settings:
    -Xms768m -Xmx1024m -XX:MaxPermSize=256m
  4. Reduce the number of warning reported by eclipse per compilation unit (class), default is 100, reduce it to 10.
    It help nobody to see a workspace slowing down because of too many warning logging.
    Remove the warnings instead 😉
  5. SVN console with subversive is too verbose as default, go to eclipse preferences – Team – SVN – Console.
    Logging SVN errors should be enough.
  6. Use a Defragmenter! NTFS fragment fast with so many small files in workspace, every 2 week is a good practice.
  7. I am using Java 1.6u10 (BETA!) and have experience no crash till now,
    being on the edge can be costly in time through. #Maven forking should benefit from the reduce java kernel
    size and bootstrap time

maven2 Unit Test code reuse and dependencies

In a multi modules project where you have write API or common code for unit tests in one project and want to reuse these in the tests for another project. #Maven will crash during the compile phase if you do not make the following.

Maven rules of the game:

  • The main code in src/main/java is visible across modules if you did specify project
    dependencies in pom.xml.
  • Test code reside in src/test/java and is not shared across modules, moreover
  • Test code can use any code from src/main/java but not the other way around, which
    make sense as we want to clearly separate test code (junit testcases) from code shipped.

The solution is to create additional test jar for each module, this is done by putting in the
parent pom (lets call it parent-pom.xml)

inside the <build></build> tags the following:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>test-jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>

This will create for each modules an additional jar named {artifactId}-{version}-tests.jar
during the goal test-jar

Now for every modules where you want to reuse test classes, all you have to do in to put in every
modules pom.xml a dependency to that test jar by adding the tests classifier

<dependency>
    <groupId>yourGroup</groupId>
    <artifactId>yourReusableModuleArtifact</artifactId>
    <version>0.1-SNAPSHOT</version>
    <classifier>tests</classifier>
    <scope>test</scope>
</dependency>

This has work for me with #Maven 2.0.8

OpenSuse 11.0 reviews

geeko I am a SUSE and OpenSuse user since the version 9.0 (back to 2003) and I
decided to install the latest sequel, aka OpenSUSE 11.0 the same day it came out.

You can read a lot of positive review below:

What has impressed me after only 4 days,

  • Was the time it has took to install a full KDE4 desktop: no more than 25 minutes.
  • YAST auto detect the resolution of my ceiling projector a lot better (like any windows XP)
  • The number of 3rd party repository is huge and is just a few clicks away, so installing VLC,
    NVIDIA, ATI drivers and software (Google PICASA, Google Earth) has never been so easy.
  • KDE 4 has never crash (till now) even with COMPIZ activated as default.
  • KDE4 transparent icon surrounding is a bit disturbing at first, but I assume this feature can be switch off.
  • Software update are a lot faster and the tray icon checking for update is so fast that you’ll
    forget all issues encountered with OpenSUSE 10.3

All in all a very good operating system that I truly like using every day.

Download your live CD or DVD here

KDE 4.1 is getting better and better everyday and will soon look like any MAC or Vista,
look here some astonishing screen shots

kde4.1.preview

OpenSUSE 11.1 ships December 18th, 2008 for both download and boxed editions!

My favorite #Linux distribution is ready to be delivered in no less than 2 days…

I will share it with bittorrent 2 weeks long and will provide some first feedback on how it react on my 2 computer.

Sneak Peeks at openSUSE 11.1: Improved Installation, Easier Administration

Vista/Mac OSX has raised the bar in the area of good looking desktop, but openSUSE is now also able to fight back, just look at the screen  shots below for getting an insight in the new openSUSE 11.1:

Upon logging into your openSUSE desktop, you’ll be asked to send some hardware information to the Smolt Project. I like the idea of submitting real hardware profiles to developer so they can really concentrate on real hardware support requirement. In the same area, I would like to see a post mortem process crash agent like in XP/Vista so real statistics can be made and bugs corrected faster…

Le M.O.C.I.M et les pilotes d’hélicoptères

Il est recommandés si vous n’avez pas encore d’helicoptère RC (=Radio-Commandé) de venir vous renseigner au club avant, en effet nous pourrons vous conseiller sans interêts mercantile sur le meilleur matériel à acquérir. Néanmoins il est chaudement recommandé de ne commencer que par un simulateur 1 bon mois à raison de 15 minutes par jour (example de simulateur http://www.reflex-sim.de (le meilleur regarder ici les screenshots de la futur version 2004 : http://www.rcsim.de/sreenshots_xtr.htm ) ou www.realflight.com ) avant même d’envisager l’achat d’une machine. En effet si jamais vous ne trouvez cela pas intéressant, vous pouvez toujours revendre le simulateur ou vous mettre à l’avion RC (et/ou vous entrainez avec le même simulateur).

Toutes les machines actuelles sont très bonnes, simplement en choisissant une machine non representé au club, votre courbe de progression sera plus lente (vous aurez moins de conseils adapté à votre machine mais plus général sur l’hélicoptère) et vous ne pourrez pas être dépanné par un membre si jamais une pièce venait a casser (usure ou crash) un samedi apres midi….(ce qui arrive malheureusement souvent) idem pour les commandes groupés de matériels.

C’est pour cela que nous recommandons l’une des machines suivantes et ce sans ordre de préférence car elles sont toutes les deux excellentes:

  • Caliber 30 de Kyosho
  • Raptor 30 V2 de Thunder Tiger

Eventuellement vous pouvez acquérir un Raptor 50 voir un Raptor 60 mais nous vous le déconseillont car ces machines consomment 50% de carburant en plus (+55% pour un classe 50 et +70% pour un classe 60 à 3€ le litre de SyntoGlow 1% nitrométhane) de plus, le prix des pièces est le double de celle de la classe 30. Si on vous dit qu’un hélico de classe 60 est plus stable qu’un hélico de classe 30 en vol, cela n’est plus aussi vrai et depuis longtemps.

Un comparatif personnel concernant les machines raptor 30 et caliber 30 est néanmoins disponible ICI

Inutile d’utiliser de la cool power 15% ou tout autre carburant fortement nitré (= % de nitrométhane élevé), pour un débutant c’est vraiment jeter l’argent par les fenêtres. Idem pour toutes les pièces de tunings (les hélico ci-dessus n’ont besoin de aucune pièce en métal pour mieux fonctionner) ou pot d’échappement de marque ou pales fibres (les pales bois coutent 15-20€ alors que les pales fibres plus de 50€). Ce qui compte lorsque l’on débute c’est de pratiquer un maximum, donc de voler le plus souvent possible. Encore une fois, le but d’un débutant est de voler sur un budget mais tout en achetant des pièces de qualités qu’il pourra réutiliser sur ses autres/futurs hélico, par exemple un bon gyroscope piézo-electrique (pas un gyroscope mécanique!) heading hold (=conservateur de cap) est maintenant indispensable.

Pensez que l’équipement de terrain est aussi couteux. A gauche c’est un caliber 30 équipé d’une bulle de Raptor 30.

Différence de taille entre un Helico de classe 30 et un de classe 60

.Pour les télécommandes, le choix est encore plus restreint car tous les pilotes volent sur Futaba (d’ailleurs en compétition à tous les niveaux c’est pareil), les seules autres télécommandes viables pour la pratique de l’hélicoptère RC sont les JR ou “éventuellement” les Robbe, pourquoi?

  • Ce sont les seules télécommandes acceptables pour faire de l’hélico.Il faut au moins 5 canal mais elles ont toutes plus de 8 voies.Et en standard elle ont plein de boutons, potentiomètres qui seront bien utiles plus tard.
  • Elles sont livres avec des afficheurs ou ont peut voir les courbes de gazs et possède des programmes hélico valables.
  • Elles sont connues de tous, donc on peut vous aider et les programmer les yeux fermés ou presque .
  • On peut vous prendre en double commande (=écolage) car les signaux et les prises élève-maitre sont compatibles.

Nous ne pourrons vous donner de l’aide sur Multiplex, tout juste un support limités sur Hitec ou autres. Pensez donc à investir dans une bonne télécommande car

  • C’est un investissement sur l’avenir, On la garde pour des années.
  • Les réglages sont plus faciles.
  • Elle peut servir pour tout loisirs RC: avions bateaux etc…

Cela peut paraitre injuste et beaucoup d’officianados de Multiplex vont s’insurger, mais c’est comme cela. Nous recommandons la Futaba FF9 (en version hélico ou avion c’est pareil c’est le même software, tout au plus les servo livrés sont de moins bonne qualités) et plus anciennement la FF8 (plus en vente mais ancètre de la FF9). Elle est chere (environ 500€) mais au niveau fonctionnalités elle surpasse toutes les autres télécommandes et a un très bon rapport qualité prix.

Si vous voulez plus de détails ou cherchez une télécommande avec un budget limité, pensez à passer au club , nous pourrons en discuter plus longuement. Garder à l’esprit que l’hélicoptère radiocommandé est avec la mode des moteurs minitures à turboréacteur la discipline la plus couteuse qui existe en modélisme (même si les prix n’ont jamais été aussi attrayant auparavant).

Crash

Aie trop tard, l'(ir)réparable est arrivé ! pas de blessés ? alors relativiser, ce n’est pas si grave mais :

  • Suiver scrupuleusement la liste post crash que j’ai traduite de l’anglais.
  • Vérifier que le gyro ou récepteur n’ont pas de trace d’impact ou ne sont pas entré en contact avec le sol, sinon c’est direct SAV.
  • Si le crash est important (du genre un trou dans le sol et 50% de casse), électronique direction SAV et expliquer leur le type de crash (frontal, latéral et la vitesse d’impact).
    Il n’est pas rare d’entendre des personnes qui n’ont pas respecter cette rêgle, et qui aprés avoir reparé la machine ont recrashé a cause d’un problème électronique….rageant et idiot non ???
  • Ramasser les pièces au sol (inventaire rapide car la moindre pièce vous coutera cher) et démonter à la maison.
  • Se dire que tout le monde crashe ! si vous n’avez pas de crash, alors vous ne volez pas ! positiver ! pourquoi est ce arrivé ? que puis je faire pour l’éviter la prochaine fois ? dans 99% des cas, il s’agit d’un manque d’entrainement ! retour au simulateur et travaillez votre point faible.
  • Après un crash, beaucoup de personne ressentent de l’apréhension, c’est humain ! raison de plus pour ne casser qu’un hélico pas cher !

Pilot´s Profile


Pilote Name Walter Cédric
Age 30 years
Location FRANCE
Comment Do not fly much in 2001, is’nt it raining too much these past 2 years ?
First Heli Bought on 23th July 2000 (1st Raptor 30)
Number of crash see Below
Fuel litre consumed aroung 170 liters
Level Mid flyer
Simulator Reflex XTR
Reflex 4.0.3
Realflight Deluxe G2 + addon 1,2,3&4 (sold)
Blades Wood blade are cheap and ok for my style of flying otherwise using SAB 300
gyro Prreviously use CSM gyro for their simplicity and NO they do not drift! no using Gy401
Radio Previously Futaba FF8 now a Futaba FF9
Glow plugs OS8 (recommended for OS32) or ENYA3
Dislike Thunder Tiger engine, NEVER had luck with them (reliability)
Like OS engine, great and reliable

 

Continue reading Pilot´s Profile

My Raptor 30 v1 (sold)

My first helicopter :

This is the last view of my thunder tiger raptor, I regret it each time I see another helicopter, but I do the right thing : after fighting 2 months with the woof (without poof) and without flying, changing for 250 Euro of part (metal wash out, metal swash plate, flat damper, blade, servo,blade grip etc). I sell it… The person cured the woof and poof because he glue the rotor hub on the main mast.

In the very beginning of 2001, I was the first person who recommend the raptor, but with the current problem, I can not ! keep your hand away from this bird (or learn to fly with it and sell it if he start to Wah Wah or woof and poof). The risk is to kill yourself, crash the helicopter, or injured someone else in during loosing the control. Note that I would buy immediately 2 raptor when ace (the distributor) find the solution, but as today 21.12.2001, there is at least 20 solutions on internet and none cured the problem completely. Worse is the fact than some are really different each other. SORRY BUT BYE BYE RAPTOR

PS
Raptor, I regret you each time I clean the motor from my Robbe Moskito xxl (really a pain to view the motor)

[ngg src=”galleries” ids=”5″ display=”basic_thumbnail” thumbnail_crop=”0″ show_slideshow_link=”1″]

old message I’ve posted on the newsgroup:

Hello,

So now many french flyer like me have the same problem, the woof and poof (tracking on only one side of the rotor, more than five centimeter, appear not always, only under low load around 0°) can even let the main blade hit the tail boom.

I do the following on my raptor :

– I change the wash out for a metal one (ace)
– I change the swash plate for a metal one (not from ace, quick uk)
– I change the main blade for fiber one (quick uk)
-> woof and poof still remained

I decide to add some weight in the canopy : install dual bat + another pack of battery (it may change Eigen frequency of the whole system)
-> woof and poof still remained

Another flyer add a shim to remove the slope as described on many site
-> woof and poof still remained but isn’t anymore so enormous….not an 100% solution

So i decide to change the main rotor grip + flat damper (not so expensive in fact)
-> woof and poof still remained

Delta 0
-> less woof and poof but still present….

One friend cure it: glue the rotor head with CA to the main mast !!!!!!

But if it cured the problem, maybe all raptor flyer should call Ace and ask for A FREE UPGRADE SOLUTION (my raptor has less than a year)
if not I will put a HEIM rotor head system instead of the ace.

best regards
cedric