Install MemCP with Docker: Difference between revisions
(Created page with "To build the image the first time: git clone https://github.com/launix-de/memcp cd memcp docker build . -t memcp For app development and to enter the Scheme console: mkdir data docker run -v data:/data -it -p 4321:4321 -p 3307:3307 memcp To run your custom Scheme apps (like the one from RDF templating and model driven development): make data docker run -e PARAMS="lib/main.scm apps/minigame.scm" -v data:/data -it -p 4321:4321 -p 3307:3307 memcp During productio...") |
Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<!-- Copyright (C) 2026 Carl-Philip Haensch --> | |||
<!-- SPDX-License-Identifier: GPL-3.0-or-later --> | |||
<span id="install-memcp-with-docker"></span> | |||
= Install MemCP with Docker = | |||
<pre>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</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. | |||
Pass additional flags through <code>PARAMS</code>, for example <code>-e PARAMS='--disable-mysql --api-port=4321'</code>. <code>APP</code> selects the Scheme entry file and defaults to <code>lib/main.scm</code>. | |||
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: | |||
<pre>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</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. | |||
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.