Skip to content

Commit 449f85d

Browse files
authored
Merge branch 'main' into feat/keystore-signer
2 parents a494cf5 + 1ac668e commit 449f85d

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ COPY --from=ghcr.io/foundry-rs/foundry:latest /usr/local/bin/anvil /usr/local/bi
2929
# prepare user-owned data dirs for rootless startup
3030
RUN mkdir -p /home/vscode/.local/share/pg/pgdata \
3131
&& mkdir -p /home/vscode/.local/share/mysql \
32+
&& mkdir -p /home/vscode/.local/share/tmp \
3233
&& chown -R vscode:vscode /home/vscode/.local/share
3334

3435
# Set environment variables based on build args
3536
ENV PG_BIN_DIR=/usr/lib/postgresql/${PG_MAJOR}/bin
3637

3738
USER vscode
38-

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@
3535
"MYSQL_USER": "singularity",
3636
"MYSQL_PASSWORD": "singularity",
3737
"MYSQL_SOCKET": "/home/vscode/.local/share/mysql/mysql.sock",
38+
"TMPDIR": "/home/vscode/.local/share/tmp",
39+
"GOTMPDIR": "/home/vscode/.local/share/tmp",
3840
"PGDATA": "/home/vscode/.local/share/pg/pgdata",
3941
"PGPORT": "55432",
4042
"PGSOCK_DIR": "/home/vscode/.local/share/pg"
4143
},
4244
"runArgs": ["--userns=keep-id"],
4345
"containerUser": "vscode"
4446
}
45-

.devcontainer/post-create.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ chmod +x .devcontainer/*.sh || true
1010
echo "Setting up databases..."
1111

1212
# Create data directories
13-
mkdir -p /home/vscode/.local/share/pg/pgdata /home/vscode/.local/share/pg /home/vscode/.local/share/mysql/data /home/vscode/.local/share/mysql
13+
mkdir -p /home/vscode/.local/share/pg/pgdata /home/vscode/.local/share/pg /home/vscode/.local/share/mysql/data /home/vscode/.local/share/mysql/tmp /home/vscode/.local/share/mysql /home/vscode/.local/share/tmp
1414

1515
# Initialize Postgres
1616
if [ ! -f "/home/vscode/.local/share/pg/pgdata/PG_VERSION" ]; then
@@ -27,7 +27,12 @@ fi
2727
# Initialize MariaDB
2828
if [ ! -d "/home/vscode/.local/share/mysql/data/mysql" ]; then
2929
echo "Initializing MariaDB..."
30-
mariadb-install-db --datadir=/home/vscode/.local/share/mysql/data --auth-root-authentication-method=normal --skip-test-db >/dev/null
30+
export TMPDIR=/home/vscode/.local/share/mysql/tmp
31+
mariadb-install-db \
32+
--datadir=/home/vscode/.local/share/mysql/data \
33+
--tmpdir=/home/vscode/.local/share/mysql/tmp \
34+
--auth-root-authentication-method=normal \
35+
--skip-test-db >/dev/null
3136
fi
3237

3338
# Start both servers
@@ -51,5 +56,3 @@ FLUSH PRIVILEGES;
5156
SQL
5257

5358
echo "Database setup completed successfully"
54-
55-

.devcontainer/start-mysql.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -euo pipefail
44
# MariaDB server configuration
55
MYSQL_BASE="${HOME}/.local/share/mysql"
66
DATA_DIR="${MYSQL_BASE}/data"
7+
TMP_DIR="${MYSQL_BASE}/tmp"
78
SOCKET="${MYSQL_SOCKET:-${MYSQL_BASE}/mysql.sock}"
89
PID_FILE="${MYSQL_BASE}/mysql.pid"
910
PORT="${MYSQL_PORT:-3306}"
@@ -17,9 +18,11 @@ fi
1718

1819
# Start MariaDB server
1920
echo "Starting MySQL server"
21+
mkdir -p "${TMP_DIR}"
2022
touch "${LOG_FILE}"
2123
nohup mariadbd \
2224
--datadir="${DATA_DIR}" \
25+
--tmpdir="${TMP_DIR}" \
2326
--socket="${SOCKET}" \
2427
--pid-file="${PID_FILE}" \
2528
--bind-address=127.0.0.1 \
@@ -44,4 +47,4 @@ if [ -f "${LOG_FILE}" ]; then
4447
tail -n 200 "${LOG_FILE}" || true
4548
echo "--- End MariaDB error log ---"
4649
fi
47-
exit 1
50+
exit 1

0 commit comments

Comments
 (0)