DEV Community

Cover image for Docker Compose - wordpress and docker [EN]
Alexandre Fernandes dos Santos
Alexandre Fernandes dos Santos

Posted on • Edited on

2

Docker Compose - wordpress and docker [EN]

I came here to share while listening to my "sertanejo" a script for docker-compose that creates a container with Wordpress and MariaDb as a database for a project i'm doing on twitch which is to create some themes so that's it i hope it helps someone else and any question just comment and i will be happy to answer ✌️

version: '3'

services:
  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: user
      WORDPRESS_DB_PASSWORD: pass
      WORDPRESS_DB_NAME: wordpress
    volumes:
      - wordpress:/var/www/html
    depends_on:
      - db

  db:
    image: mariadb:latest
    restart: always
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: user
      MYSQL_PASSWORD: pass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - db:/var/lib/mysql

volumes:
  wordpress:
  db:
Enter fullscreen mode Exit fullscreen mode

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (1)

Collapse
 
wmramadan profile image
Wael Ramadan

Nice article, this might be worth a look github.com/WMRamadan/docker-compos...

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post