Мне нужно к этому докеру подключить redis and mysql
version: '3.8'
services:
fapbot:
image: fapbot
build:
context: .
dockerfile: ./Dockerfile
cap_add:
- SYS_ADMIN
shm_size: 1gb
из этого
version: '3.8'
services:
redis:
container_name: redis_server
image: redis
restart: always
expose:
- '6379'
volumes:
- data:/data
command: redis-server --save 60 1
db:
container_name: dbmysql
image: mysql:8
restart: always
environment:
MYSQL_DATABASE: 'asd'
MYSQL_USER: 'test'
MYSQL_PASSWORD: '1'
MYSQL_ROOT_PASSWORD: '1'
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3306:3306'
expose:
# Opens port 3306 on the container
- '3306'
# Where our data will be persisted
volumes:
- ./mysql-init.sql:/tmp/mysql-init.sql
phpmyadmin:
image: phpmyadmin
restart: always
ports:
- 8080:80
environment:
- PMA_ARBITRARY=1
- PMA_HOST=db
- PMA_PORT=3306
- UPLOAD_LIMIT="300M"
themerbot:
image: themerbot
restart: always
build:
context: .
dockerfile: ./Dockerfile
cap_add:
- SYS_ADMIN
shm_size: 1gb
depends_on:
- redis
- db
volumes:
data:
my-db: