Skip to content

Instantly share code, notes, and snippets.

@sajithneyo
Last active February 1, 2022 14:30
Show Gist options
  • Save sajithneyo/7bc6f8043891ca270d35d2c002cfdf38 to your computer and use it in GitHub Desktop.
Save sajithneyo/7bc6f8043891ca270d35d2c002cfdf38 to your computer and use it in GitHub Desktop.
--- MySQL with PHPMyAdmin ---
## MYSQL server
docker run --name MySQL -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d -v ~/docker-volumes/mysql:/var/lib/mysql mysql:latest
## Create new user (DBA)
CREATE USER 'sajithneyo'@'%' IDENTIFIED BY 'sajithneyo';
GRANT ALL PRIVILEGES ON *.* TO 'sajithneyo'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
## Linking phpMyAdmin
docker run --name MyAdmin -d --link MySQL:db -p 8080:80 phpmyadmin
--- RabbitMQ ---
docker run -d -v ~/docker-volumes/rabbitmq:/var/lib/rabbitmq -p 15672:15672 -p 5672:5672 --hostname my-rmq-host --name my-rmq rabbitmq:3.9.3-management`
--- MongoDB ---
docker run -d -p 27017:27017 -v ~/docker-volumes/mongo/data:/data/db -v ~/docker-volumes/mongo/dump:/dump --name mongo-replica mongo:latest mongod --replSet rs0
Then run the following lines
> docker exec -it mongo-replica bash
> mongo
> rs.initiate()
--- Jenkins ---
docker run -p 8080:8080 -p 50000:50000 -v ~/docker-volumes/jenkins:/var/jenkins_home -u 0 --name jenkins jenkins/jenkins:lts-jdk11
-u 0 tells to run with root permissions. This is not safe, Check the follwoing URL https://stackoverflow.com/questions/44065827/jenkins-wrong-volume-permissions
But it's ok if you're running in your local machine for local testing purposes
--- Elastic MQ / SQS ---
docker run -p 9324:9324 -p 9325:9325 -v ~/docker-volumes/elastic-mq/conf/elasticmq.conf:/opt/elasticmq.conf -v ~/docker-volumes/elastic-mq/data:/data --name test-mq softwaremill/elasticmq
ui -> http://127.0.0.1:9325
conf file -> Configures to persist the queues
include classpath("application.conf")
node-address {
protocol = http
host = localhost
port = 9324
context-path = ""
}
rest-sqs {
enabled = true
bind-port = 9324
bind-hostname = "0.0.0.0"
sqs-limits = strict
}
rest-stats {
enabled = true
bind-port = 9325
bind-hostname = "0.0.0.0"
}
generate-node-address = false
queues {
general-queue {
defaultVisibilityTimeout = 10 seconds
delay = 0 seconds
deadLettersQueue {
name = "general-deadqueue"
maxReceiveCount = 3 // from 1 to 1000
}
fifo = false
contentBasedDeduplication = false
}
}
messages-storage {
enabled = true
uri = "jdbc:h2:~/docker-volumes/elastic-mq/data"
}
aws {
region = eu-central-1
accountId = 000000000000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment