Sign inSign up

allen7wang/easemob-1v1-infra

By allen7wang

Updated 18 days ago

Easemob 1v1 Demo Compose stack: MySQL 8.0 and Redis 7 infrastructure.

Compose
0

34

allen7wang/easemob-1v1-infra repository overview

Easemob 1v1 Demo Infrastructure

Docker Compose OCI application for the data services used by the Easemob 1v1 Demo App Server.

Included services

ServiceImagePurposeHost port
MySQLmysql:8.0App Server user and matching data127.0.0.1:3306
Redisredis:7-alpineCache and channel data127.0.0.1:6379

The ports bind to loopback only. Within the Compose network, the App Server can reach the services at mysql:3306 and redis:6379.

What is not included

  • The App Server itself
  • Existing MySQL or Redis data from the machine where this artifact was created
  • Database credentials, Docker Hub credentials, or other secrets

Each deployment creates fresh named volumes (mysql-data and redis-data).

Start

Create a directory and an .env file with strong, unique passwords:

mkdir easemob-1v1-infra && cd easemob-1v1-infra

cat > .env <<'EOF'
MYSQL_DATABASE=app_server
MYSQL_USER=appserver
MYSQL_PASSWORD=replace-with-a-long-random-password
MYSQL_ROOT_PASSWORD=replace-with-a-different-long-random-root-password
MYSQL_HOST_PORT=3306
REDIS_HOST_PORT=6379
EOF

Start the published Compose artifact:

docker compose --env-file .env \
  -f oci://docker.io/allen7wang/easemob-1v1-infra:v1 up -d

Check its state:

docker compose --env-file .env \
  -f oci://docker.io/allen7wang/easemob-1v1-infra:v1 ps

If ports 3306 or 6379 are already in use, change MYSQL_HOST_PORT and REDIS_HOST_PORT before starting.

Persistence and removal

Data is retained in Docker named volumes after docker compose down. To remove the stack and all newly created data, run docker compose down -v with the same --env-file and -f oci://... arguments.

Security

Keep .env private. Do not publish it or use Docker Compose's --with-env option when publishing a derivative artifact.

Tag summary

Content type

Compose

Digest

sha256:bda63a3fe

Size

1.3 kB

Last updated

18 days ago