Docker + mysql + Composer Gotchya!

Have you ever tried to use docker-compose to create a MAMP container?

I have!

And I ran into one of the most confusing problems ever.

Now, I ran docker-compose up -d several times, as I figured out how I wanted my docker-compose.yml configured to run my wordpress site.

Eventually I added environment variables for the MYSQL_DATABASE, MYSQL_USER, MYSQL_PASSWORD and MYSQL_ROOT_PASSWORD.

To my surprise, I could NOT get my wordpress site to connect to the database, and I could not log into the database from the command line as root or the MYSQL_USER.

It turns out, when I run docker-compose down it does not remove the project_mysql volume! As a result, when I run docker-compose up -d again, the project_mysql volume already exists, so it doesn’t re-create the database.  That is why my environment variables were being ignored!  (Replace project with the name of your project of course.)

To resolve this issue, I had to run docker-compose down followed by docker volume rm project_mysql.  The next time I ran docker-compose up -d, the environment variables were read by the docker-entrypoint.sh, and the database was re-created the way I wanted it to be.

Alternatively, I learned that I could run docker-compose down -v to delete volumes along with the containers specified in the docker-compose.yml.  This can be helpful, although it’s not always ideal, specifically when you want to keep changes you have made to your database between restarts.

This doesn’t appear to be documented anywhere.

I hope it saves you time in the future!

Is God Real? A Pastor Described an Experience from my Childhood

I want to share a story with you from my time at the International House of Prayer.  When the woman met Jesus at the well, and He told her everything about herself, the first thing she did was go and tell everyone else what Jesus had done.  It occurs to me that my encounters with God are not just for me.  So I am sharing this to encourage you, that God is real, and worthy of our love, admiration and worship. 

I have to warn you.  Some of this content is not appropriate for young children.  Parental guidance is advised.

In 2009, at the age of 29, I was attending a program called “Living Waters”, a healing ministry for sexual and relational brokenness.  I had been addicted to pornography and masturbation from the age of 14.  When I joined living waters, I had been attending church and abstinent for 2 years, but I was not free from an overwhelming urge to return to it.  I just grit my teeth every morning, on my face praying to God, with tears, that He would set me free.

I joined living waters to encounter God.  I really wanted proof that He was REAL;  Not just a story written by people over thousands of years, to control the way we behave.  I wanted to know that He wasn’t just another Santa Clause, Easter Bunny, or Tooth Fairy.

Living waters was a 4 hour, weekly meeting, for 6 months.  Now, a typical meeting looked like this.  We started with corporate worship.  Then a teaching.  There were testimonies from the leadership team about what they dealt with and how they got free.  Then corporate prayer.  And finally, small group prayer.

One day during the corporate prayer time, I stood at the front for prayer.  A musician played worship music, and I stood there with my eyes closed, talking to God and waiting for someone to pray for me.  It felt like 30 minutes had gone by, and no one had prayed for me.  I felt like getting on my knees and I told God, “It’s okay.  If no one prays for me, I’ll still wait for you to speak to me.  I’ll still love you.”

I heard the musician begin to wrap up the song and people were going back to their seats, and I was still there, on my knees with my eyes closed, when I heard someone get on the microphone, and they said, “I see a picture of a little boy standing on his front porch with a little brown leather suitcase in his hand, and he’s wondering, ‘Who is going to come get me?  Is grandma going to come get me?  Is grandpa going to come get me?  Who?'”, and then they just stopped talking and the music ended.

I couldn’t believe what I had just heard.  It was a memory from my childhood that I had been thinking about for 22 years.  It was so vivid.  I was about 7 years old, living in a small town in Nebraska.  I had gotten into a fight with my mother.  I don’t remember what it was about, but I remember her saying, “Fine!  Just leave!”  So I packed up my little brown leather suitcase, and I stood out on the front porch, alone, crying, wondering who was going to come get me.  Was grandma going to come get me?  Was grandpa going to come get me?  Who?

I went back to my seat, and I waited to be dismissed to our small groups.  When I got up I told the pastor who had shared the picture, that it was an exact memory, almost word for word, from my childhood.  She responded with, “God wants you to know that He was there.”

That meant so much to me.  There was no way for my pastor to know what had happened to me, unless someone or something had told her, and there was no one to tell her.  I know that she prays to Jesus, and asks the Holy Spirit for pictures and words of knowledge, so I believe it was God that told her this story about me.  It was just one out of several experiences I have had, that prove to me that God is real, outside of the bible.

And if God is real outside of the bible, then I can believe that God, using people, wrote the bible.  And if God wrote the bible, then it is worth reading.  It is worth trusting.  And, it is worth obeying.

I hope that this story encourages you where you are at.

More stories to come.  🙂

A response to Mike Pence’s address at Turning Point USA

We have got to stop lying to our children, about Santa Clause, the Easter Bunny, and the Tooth Fairy.

We’ve got to stop calling “American Values” “Biblical Values”.

We’ve got to stop legalizing sin.

We have to return to God.

Never does God say in the Bible, “Freedom of religion!” “Worship whoever and whatever you please!” “Have sex with whomever and whatever you want. Love is love.”

Beloved, He says, “You shall have no other gods before (beside) me.”

He says, “These commandments that I give you today are to be on your hearts. Impress them on your children. Talk about them when you sit at home and when you walk along the road, when you lie down and when you get up.” Duet 6:6-7

He says, “You shall not murder.”

He says, “Do not have sexual relations with a man as one does with a woman; that is detestable.” Lev 18:22

He said, “Do not defile yourselves in any of these ways, because this is how the nations that I am going to drive out before you became defiled. Even the land was defiled; so I punished it for it’s sin and the land vomited out its inhabitants.”

Beloved, this is going to happen to America if we don’t repent and return to the one that created us.

I love VP Mike Pence, but coronavirus, the flu, cancer, STDs, the hurricanes, earthquakes, tornados, wars and rumors of wars are all judgement for our national sins.  God disciplines those He loves.  It is to motivate us to repent, but if no one explains this; if they explain it all away as “natural causes and natural disasters” then the people will not respond in the right way.  A vaccine will not resolve this problem with God.  Only repentance, turning away from these sins will, and only Jesus Christ can enable us to do this. 

I say this with love and sincerity.

This Christmas, look to Jesus for help and salvation.  He is our only hope.