Skip to content

Instantly share code, notes, and snippets.

@erral
Last active January 9, 2023 11:03
Show Gist options
  • Save erral/d7e894209b94dc9a1610a61a5f278638 to your computer and use it in GitHub Desktop.
Save erral/d7e894209b94dc9a1610a61a5f278638 to your computer and use it in GitHub Desktop.
mysql eta adminer interfazea martxan jartzeko docker-compose.yml fitxategia
# copy this file to a folder and name it docker-compose.yml
# run the services with the following command:
#
# $ docker compose up
#
# You will have a mysql server running on 3306 and an adminer interface con 8081
#
# It will create a default databse called mydb and a username called mydb_user with password mydb_pass
# with permissions to manage the database
version: "3.1"
services:
db:
image: mariadb
restart: "no"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: mydb
MYSQL_USER: mydb_user
MYSQL_PASSWORD: mydb_pass
ports:
- 3306:3306
volumes:
- db_data:/var/lib/mysql
adminer:
image: adminer
restart: "no"
ports:
- 8081:8080
depends_on:
- db
environment:
ADMINER_DEFAULT_SERVER: db
volumes:
db_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment