Skip to content

Instantly share code, notes, and snippets.

@maxca
Created December 13, 2018 08:32
Show Gist options
  • Save maxca/2a031326a8fcac77c4d56ab1c4367826 to your computer and use it in GitHub Desktop.
Save maxca/2a031326a8fcac77c4d56ab1c4367826 to your computer and use it in GitHub Desktop.
mysql-redis-docker-compose.yml
version: '2.3'
services:
mysql:
restart: always
image: mariadb:10.3
container_name: mariadb
ports:
- "3307:3306"
volumes:
- ./store/:/var/lib/mysql
mem_limit: 512m
networks:
- mysqlnetwork
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=local
- MYSQL_USER=root
- MYSQL_PASSWORD=root
- PMA_ARBITRARY=1
- PMA_HOST=mysql
- PMA_PORT=3306
- PMA_USER=root
- PMA_PASSWORD=root
mysql-admin:
restart: always
image: phpmyadmin/phpmyadmin
container_name: mariadb-phpmyadmin
ports:
- "8001:80"
mem_limit: 512m
networks:
- mysqlnetwork
depends_on:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_USER: root
PMA_PASSWORD: root
redis-server:
restart: always
image: redis:4.0
container_name: redis-server
command: /bin/bash -c 'redis-server --appendonly yes'
sysctls:
- net.core.somaxconn=65535
ports:
- "6380:6379"
volumes:
- ./redis:/data
mem_limit: 96m
networks:
- mysqlnetwork
volumes:
mysql:
driver: local
redis:
driver: local
networks:
mysqlnetwork:
driver: bridge
@tunggnu
Copy link

tunggnu commented Sep 26, 2023

Thank you for this file. It works for me.

@hungdolar
Copy link

Love you

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