Install MemCP with Docker: Difference between revisions
Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference) |
Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference) |
||
| Line 6: | Line 6: | ||
= Install MemCP with Docker = | = Install MemCP with Docker = | ||
< | <pre>docker pull carli2/memcp:latest | ||
docker volume create memcp_data | docker volume create memcp_data | ||
docker run -d --name memcp --restart unless-stopped \ | docker run -d --name memcp --restart unless-stopped \ | ||
-e ROOT_PASSWORD='replace-with-a-strong-password' \ | -e ROOT_PASSWORD='replace-with-a-strong-password' \ | ||
-v memcp_data:/data -p 4321:4321 -p 3307:3307 \ | -v memcp_data:/data -p 4321:4321 -p 3307:3307 \ | ||
carli2/memcp:latest</ | carli2/memcp:latest</pre> | ||
<code>ROOT_PASSWORD</code> is used only for a fresh <code>/data</code>. The image runs with <code>--no-repl</code>, persists under <code>/data</code>, and forwards stop signals to MemCP. Pin a release tag in production instead of <code>latest</code>. Do not publish either port to an untrusted network without firewall/reverse-proxy protection. | <code>ROOT_PASSWORD</code> is used only for a fresh <code>/data</code>. The image runs with <code>--no-repl</code>, persists under <code>/data</code>, and forwards stop signals to MemCP. Pin a release tag in production instead of <code>latest</code>. Do not publish either port to an untrusted network without firewall/reverse-proxy protection. | ||
| Line 22: | Line 22: | ||
To test the image produced by the current checkout instead of the published image: | To test the image produced by the current checkout instead of the published image: | ||
< | <pre>git clone https://github.com/launix-de/memcp.git | ||
cd memcp | cd memcp | ||
docker build -t memcp-local . | docker build -t memcp-local . | ||
| Line 29: | Line 29: | ||
-e ROOT_PASSWORD='development-password' \ | -e ROOT_PASSWORD='development-password' \ | ||
-v memcp_dev_data:/data -p 4321:4321 -p 3307:3307 \ | -v memcp_dev_data:/data -p 4321:4321 -p 3307:3307 \ | ||
memcp-local</ | memcp-local</pre> | ||
Interactive mode is useful for Scheme application development; production containers should remain detached and use <code>--no-repl</code>. To load another Scheme entrypoint, mount or bake the application into the image and select it with <code>APP</code>. Use <code>PARAMS</code> only for command-line flags, not as a replacement for the application filename. | Interactive mode is useful for Scheme application development; production containers should remain detached and use <code>--no-repl</code>. To load another Scheme entrypoint, mount or bake the application into the image and select it with <code>APP</code>. Use <code>PARAMS</code> only for command-line flags, not as a replacement for the application filename. | ||
Bind mounts such as <code>-v /var/lib/memcp:/data</code> are also supported. Ensure the container user can write the directory and include it in backup and restore procedures. | Bind mounts such as <code>-v /var/lib/memcp:/data</code> are also supported. Ensure the container user can write the directory and include it in backup and restore procedures. | ||
Latest revision as of 12:13, 28 August 2026
Install MemCP with Docker
docker pull carli2/memcp:latest docker volume create memcp_data docker run -d --name memcp --restart unless-stopped \ -e ROOT_PASSWORD='replace-with-a-strong-password' \ -v memcp_data:/data -p 4321:4321 -p 3307:3307 \ carli2/memcp:latest
ROOT_PASSWORD is used only for a fresh /data. The image runs with --no-repl, persists under /data, and forwards stop signals to MemCP. Pin a release tag in production instead of latest. Do not publish either port to an untrusted network without firewall/reverse-proxy protection.
Pass additional flags through PARAMS, for example -e PARAMS='--disable-mysql --api-port=4321'. APP selects the Scheme entry file and defaults to lib/main.scm.
Back up the volume before upgrading. Verify the container log, authenticate a query, restart the container, and verify persisted data after every upgrade.
Build and application development
To test the image produced by the current checkout instead of the published image:
git clone https://github.com/launix-de/memcp.git cd memcp docker build -t memcp-local . docker volume create memcp_dev_data docker run --rm -it \ -e ROOT_PASSWORD='development-password' \ -v memcp_dev_data:/data -p 4321:4321 -p 3307:3307 \ memcp-local
Interactive mode is useful for Scheme application development; production containers should remain detached and use --no-repl. To load another Scheme entrypoint, mount or bake the application into the image and select it with APP. Use PARAMS only for command-line flags, not as a replacement for the application filename.
Bind mounts such as -v /var/lib/memcp:/data are also supported. Ensure the container user can write the directory and include it in backup and restore procedures.