Skip to content

Instantly share code, notes, and snippets.

@psahni
Created June 10, 2024 07:55
Show Gist options
  • Save psahni/122bd4b5192d95bc455a95b37b81fede to your computer and use it in GitHub Desktop.
Save psahni/122bd4b5192d95bc455a95b37b81fede to your computer and use it in GitHub Desktop.
docker-compose-example-wp-mysql
version: '3'
services:
db:
container_name: wp-mysql
image: mysql:5.7
volumes:
- $PWD/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: 12345678
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
ports:
- "3306:3306"
networks:
- my_net
wp:
container_name: wp-web
volumes:
- "$PWD/html:/var/www/html"
depends_on:
- db
image: wordpress
ports:
- "9091:80"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
networks:
- my_net
networks:
my_net:
@psahni
Copy link
Author

psahni commented Jun 10, 2024

version: '3'

services:
  reaction:
    image: reactioncommerce/reaction
    networks:
      - net
    depends_on:
      - mongo
    ports:
      - "3000:3000"
    environment:
      ROOT_URL: "http://localhost"
      MONGO_URL: "mongodb://mongo:27017/reaction"

  mongo:
    image: mongo
    volumes:
      - $PWD/data:/data/db
    networks:
      - net
networks:
  net:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment