Easemob 1v1 Demo Compose stack: MySQL 8.0 and Redis 7 infrastructure.
34
Docker Compose OCI application for the data services used by the Easemob 1v1 Demo App Server.
| Service | Image | Purpose | Host port |
|---|---|---|---|
| MySQL | mysql:8.0 | App Server user and matching data | 127.0.0.1:3306 |
| Redis | redis:7-alpine | Cache and channel data | 127.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.
Each deployment creates fresh named volumes (mysql-data and redis-data).
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.
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.
Keep .env private. Do not publish it or use Docker Compose's --with-env
option when publishing a derivative artifact.