HUB
Sign inSign up

geniesnapsupport/geniesnap_linux

By geniesnapsupport

•Updated 12 days ago

Compose
0

64

geniesnapsupport/geniesnap_linux repository overview

⁠Genie Snap for Linux

Genie Snap (forms, submissions and eSign) as a set of Linux containers. One compose app, published here, runs the whole stack: website, data API, cache, SQL Server 2025 Express, Garnet and an nginx HTTPS proxy.

docker compose --env-file genie.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:22 up -d -y

⁠Quick start

⁠1. Requirements
  • Docker Engine or Docker Desktop with a current Docker Compose that can run oci:// compose apps (docker compose version; update if -f oci://… is rejected)
  • A Genie Snap licence (GenieSnap.lic + GenieSnap.key) issued for your site's host name
  • A DNS name (or hosts-file entry) pointing at the Docker host, for example genie.example.com
  • An SMTP account or SendGrid key, so users can receive sign-in codes
⁠2. Create genie.env
# required
SITE_HOST=genie.example.com
PUBLIC_URL=https://genie.example.com
HTTP_PORT=80
HTTPS_PORT=443

# email (needed for sign-in codes)
[email protected]
SERVICE_EMAIL_NAME=Genie Snap
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_ENABLE_SSL=true

Use plain values with no quotes and no $. Keep the file private. If you use a port other than 443, add it to PUBLIC_URL, for example https://genie.example.com:5002. Every other setting is optional; see Settings⁠.

⁠3. Create a genie-files folder
FileNeededPurpose
GenieSnap.lic, GenieSnap.keyyesLicence, used by the website and the data API
sso.jsonnoSingle sign-on. If you don't provide one, SSO is switched off.
billing.jsonnoStripe billing
site.crt, site.keynoYour HTTPS certificate (PEM, full chain) and key. If you don't provide them, a self-signed certificate is generated.
esign.pfx, dataprotection.pfxnoYour own certificates. Their passwords go in ESIGN_PFX_PASSWORD / DP_CERT_PASSWORD. If you don't provide them, they are generated.
SophicGenie.bak, SophicGenieSign.bak, SophicGenieLog.baknoBring over data from an existing installation. Without them, empty databases are created.

Anything else in the folder (such as esign-consent*.json or localization/) is copied to the website. To put a file somewhere specific, place it in a client/, dataapi/ or certs/ subfolder.

⁠4. Running
docker compose --env-file genie.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:22 create
docker cp genie-files/. geniesnap-setup-1:/site/import
docker compose --env-file genie.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:22 up -d -y

On Windows PowerShell the commands are the same. The first start takes a minute or two while SQL Server initialises and the databases are created or restored. Then open PUBLIC_URL.

⁠What happens on start-up

OrderServiceRole
1setupOne-shot. Creates the passwords and keys, files your licence and certificates in place, generates whatever certificates are missing, and seeds the sample forms.
2sqlSQL Server 2025 Express
3db-setupOne-shot. Restores your .bak files, or creates empty databases, then sets up the database logins. Does nothing else if the databases already exist.
4garnet, webgeniecache, webgeniedataapi, webgenieclientThe application
5proxynginx, serving HTTPS on HTTPS_PORT and redirecting HTTP_PORT to it

Both one-shot services run again on every up. They only create what is missing, so this is safe, and it is also how updates repair older instances.

⁠Settings

All of these are optional. An empty value means the default is used, or a value is generated on the first run and kept.

SettingDefaultNotes
SITE_HOSTlocalhostMust match the licence
PUBLIC_URLhttps://SITE_HOST:HTTPS_PORTThe address users browse to
HTTP_PORT / HTTPS_PORT80 / 443
SERVICE_EMAIL, SERVICE_EMAIL_NAMEThe address emails are sent from. Your mail provider must allow it (a verified sender).
ADMIN_EMAIL, ADMIN_EMAIL_NAME, SUPPORT_EMAILSERVICE_EMAIL
SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD, SMTP_ENABLE_SSL587, true
SENDGRID_API_KEYIf set, SendGrid is used instead of SMTP
SA_PASSWORD, GENIE_DB_PASSWORDgeneratedSQL Server sa and application logins. No ; or '. SA_PASSWORD only applies the first time.
AES_KEY, AES_IV, SYSTEM_INTEGRATION_KEYgeneratedSet all three to the values from an existing installation when moving it here.
INTERNAL_SERVICE_KEY, DOWNLOAD_TOKEN_SECRETgenerated
ESIGN_PFX_PASSWORD, DP_CERT_PASSWORDgeneratedRequired if you supply your own .pfx files
ESIGN_CONTACT_INFO, ESIGN_LOCATIONShown in eSign certificates
STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY, STRIPE_WEBHOOK_SECRETStripe billing
PROMPT_API_KEY, DISPLAY_CHATBOT_INSTRUCTIONSAI form assistant
MSSQL_PIDExpressSQL Server edition
GARNET_VERSION2.2.13
FRONT_NET / BACK_NET172.30.0 / 172.31.0Change these to run a second site on the same host

⁠Everyday commands

The project name is geniesnap, so once the stack exists you don't need the oci:// address for these:

docker compose -p geniesnap ps                                        # status
docker compose -p geniesnap logs -f webgenieclient webgeniedataapi    # logs
docker compose -p geniesnap restart webgenieclient                    # restart the website
docker compose -p geniesnap stop                                      # stop (data is kept)
docker compose -p geniesnap start                                     # start again

Change a site file (a new licence, sso.json or certificate):

docker cp genie-files/. geniesnap-setup-1:/site/import
docker compose --env-file genie.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:22 up -d -y
docker compose -p geniesnap restart webgenieclient webgeniedataapi proxy

Change a setting in genie.env: run the same up -d -y command again. Compose recreates only the services that are affected.

Connect to the database (sa password):

docker exec -it geniesnap-sql-1 bash -c '/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$(cat /secrets/SA_PASSWORD)" -C'

⁠Updating

Change the tag to the new version. Run pull first, because Compose otherwise keeps images it already has under the same tag:

docker compose --env-file genie.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:23 pull
docker compose --env-file genie.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:23 up -d -y

Data, secrets and certificates live in volumes and are kept.

⁠Data and backups

VolumeContents
geniesnap_mssql-dataDatabases
geniesnap_filesSubmissions, forms, samples, videos
geniesnap_secretsGenerated passwords and keys, one file each
geniesnap_certsCertificates in use
geniesnap_keysData Protection keys (sign-in cookies)
geniesnap_siteLicence, sso.json, billing.json and other site files
geniesnap_backup.bak files to restore; SQL Server backups

Back up at least mssql-data, files, secrets and certs. Losing secrets or certs makes the existing data unreadable.

Run a second, separate instance on the same host: give it its own project name, ports and networks:

docker compose -p genie2 --env-file genie2.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:22 up -d -y

Here the setup container is genie2-setup-1, and genie2.env sets different HTTP_PORT, HTTPS_PORT, FRONT_NET and BACK_NET.

Delete an instance completely, including all its data:

docker compose -p geniesnap down -v

⁠Running it from a local compose file

To read or customise the compose file, save it:

docker compose --env-file genie.env -f oci://docker.io/geniesnapsupport/geniesnap_linux:22 config --no-interpolate > docker-compose.yml
docker compose --env-file genie.env up -d

⁠Troubleshooting

SymptomFix
/LicenseError pageThe licence is missing or was issued for another host name. Copy GenieSnap.lic + .key in (see Change a site file) and check that SITE_HOST matches the licence.
Browser says refused to connectPUBLIC_URL must include the port when HTTPS_PORT isn't 443. Check docker compose -p geniesnap ps.
Certificate warningExpected with the generated self-signed certificate. Supply site.crt + site.key.
Sign-in codes or emails don't arriveCheck docker compose -p geniesnap logs webgenieclient. With SMTP, the SERVICE_EMAIL sender must be verified with your provider, which otherwise accepts the message and then drops it.
Cannot return null from an action method after recreating an instanceOld sign-in cookies. Clear this site's cookies in the browser or use a private window.
Form generation fails, or EXECUTE permission denied in the data APIThe instance was created by an older image. Run the two Updating commands with your current tag.
setup exits with PASSWORD does not open …pfxESIGN_PFX_PASSWORD / DP_CERT_PASSWORD don't match the .pfx files you supplied.
A one-shot service faileddocker compose -p geniesnap logs setup db-setup
Old submissions appear in a "new" instanceThe volumes were reused, because the project name is the same. Delete the instance first, or use -p with a new name.

⁠Images

ImageContents
geniesnapsupport/geniesnap_linuxThe compose app (this page)
geniesnapsupport/geniesnap_linux-webgenieclientWebsite (.NET 10, Ubuntu 24.04, Liberation and Microsoft core fonts)
geniesnapsupport/geniesnap_linux-webgeniedataapiData API
geniesnapsupport/geniesnap_linux-webgeniecacheCache service
geniesnapsupport/geniesnap_linux-proxynginx (Debian), HTTPS and routing
geniesnapsupport/geniesnap_linux-setupSetup and database scripts (based on the SQL Server image)

Also used: mcr.microsoft.com/mssql/server:2025-latest and ghcr.io/microsoft/garnet.

Tags follow the Genie Snap release number (22). By using these images you accept the Genie Snap Terms of Service and EULA, and the SQL Server licence⁠ (ACCEPT_EULA=Y is set for you).

Tag summary
Recent tags
Content type
Compose
Digest
sha256:22a2d9669…
Size
8.8 kB
Last updated
12 days ago