mirror of
https://github.com/mozilla/fxa.git
synced 2025-12-13 20:36:41 +01:00
Because: - When starting tracing with open telemetry the network name would sometimes collide and result in error. This Commit: - Sets an 'fxa' network name - Applies this network to services - Allows services to communicate by their names
27 lines
635 B
Bash
Executable File
27 lines
635 B
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
# This docker image doesn't react to SIGINTs (Ctrl+C) which is used by
|
|
# pm2 to kill processes.
|
|
# We go around this by defining a SIGINT handler, running docker in the
|
|
# background (but still logging on the screen), and running a read to keep
|
|
# the script running.
|
|
|
|
function on_singint() {
|
|
echo "Pushbox DB shutting down."
|
|
docker stop pushbox_db
|
|
exit 0
|
|
}
|
|
|
|
trap on_singint INT
|
|
|
|
docker run --rm --name pushbox_db \
|
|
--net fxa \
|
|
-p 4306:3306 \
|
|
-e MYSQL_ROOT_PASSWORD=random \
|
|
-e MYSQL_DATABASE=pushbox \
|
|
-e MYSQL_USER=test \
|
|
-e MYSQL_PASSWORD=test \
|
|
mysql/mysql-server:5.6 &
|
|
|
|
while :; do read -r; done
|