Skip to content

Commit a35775a

Browse files
michaelhodgesgithub-actions[bot]michaelhodgescrypt0rrjackspiering
authored
New Service Espocrm (#290)
* docs(contributor): contrib-readme-action has updated readme * docs(contributor): contrib-readme-action has updated readme * docs(contributor): contrib-readme-action has updated readme * Update compose.yaml Use tailscale Docker configuration parameters to advertise routes * New Service - EspoCRM * Update services/espocrm/compose.yml Co-authored-by: Jack Spiering <46534141+jackspiering@users.noreply.github.com> * Update services/espocrm/compose.yml Co-authored-by: Jack Spiering <46534141+jackspiering@users.noreply.github.com> * Update services/espocrm/compose.yml Co-authored-by: Jack Spiering <46534141+jackspiering@users.noreply.github.com> * Update services/espocrm/compose.yml Co-authored-by: Jack Spiering <46534141+jackspiering@users.noreply.github.com> * Update services/espocrm/compose.yml Co-authored-by: Jack Spiering <46534141+jackspiering@users.noreply.github.com> * Update services/espocrm/compose.yml Co-authored-by: Jack Spiering <46534141+jackspiering@users.noreply.github.com> * define mariadb version --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: michaelhodges <mr.hodges+github@gmail.com> Co-authored-by: Bart <57799908+crypt0rr@users.noreply.github.com> Co-authored-by: Jack Spiering <46534141+jackspiering@users.noreply.github.com>
1 parent 8b080d0 commit a35775a

4 files changed

Lines changed: 150 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ ScaleTail provides ready-to-run [Docker Compose](https://docs.docker.com/compose
130130
| 📚 **Docmost** | A self-hosted, real-time collaborative wiki with rich editing, diagrams, permissions, and full-text search. | [Details](services/docmost) |
131131
|**DumbDo** | A self-hosted, minimalistic task manager for simple to-do lists. | [Details](services/dumbdo) |
132132
|**Eigenfocus** | A self-hosted task and project management tool for productivity. | [Details](services/eigenfocus) |
133+
| 🗂️ **EspoCRM** | A CRM for Sales, support and marketing. | [Details](services/espocrm) |
133134
| 📝 **Excalidraw** | A virtual collaborative whiteboard tool. | [Details](services/excalidraw) |
134135
| 📝 **Flatnotes** | A simple, self-hosted note-taking app using Markdown files. | [Details](services/flatnotes) |
135136
| 👨🏼‍💻 **Forgejo** | A community-driven, self-hosted Git service. | [Details](services/forgejo) |

services/espocrm/.env

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#version=1.1
2+
#URL=https://github.com/tailscale-dev/ScaleTail
3+
#COMPOSE_PROJECT_NAME= # Optional: only use when running multiple deployments on the same infrastructure.
4+
5+
# Service Configuration
6+
SERVICE=espocrm # Service name (e.g., adguard). Used as hostname in Tailscale and for container naming (app-${SERVICE}).
7+
IMAGE_URL=espocrm/espocrm # Docker image URL from container registry (e.g., adguard/adguard-home).
8+
9+
# Network Configuration
10+
SERVICEPORT= # Port to expose to local network. Uncomment the "ports:" section in compose.yaml to enable.
11+
DNS_SERVER=9.9.9.9 # Preferred DNS server for Tailscale. Uncomment the "dns:" section in compose.yaml to enable.
12+
13+
# Tailscale Configuration
14+
TS_AUTHKEY= # Auth key from https://tailscale.com/admin/authkeys. See: https://tailscale.com/kb/1085/auth-keys#generate-an-auth-key for instructions.
15+
16+
# Optional Service variables
17+
# PUID=1000
18+
19+
#Time Zone setting for containers
20+
TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
21+
22+
# Any Container environment variables are declared below. See https://docs.docker.com/compose/how-tos/environment-variables/
23+
24+
#EXAMPLE_VAR="Environment varibale"
25+
26+
TS_DOMAIN=<MY_TS_DOMAIN>.ts.net
27+
28+
MARIADB_ROOT_PASSWORD=password
29+
MARIADB_DATABASE=espocrm
30+
MARIADB_USER=espocrm
31+
MARIADB_PASSWORD=password
32+
ESPOCRM_DEFAULT_CURRENCY=EUR
33+
ESPOCRM_DATABASE_PLATFORM=Mysql
34+
ESPOCRM_DATABASE_HOST=espocrm-db
35+
ESPOCRM_DATABASE_USER=espocrm
36+
ESPOCRM_DATABASE_PASSWORD=password
37+
ESPOCRM_ADMIN_USERNAME=admin
38+
ESPOCRM_ADMIN_PASSWORD=password
39+
ESPOCRM_SITE_URL=https://${SERVICE}.${TS_DOMAIN}

services/espocrm/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# EspoCRM with Tailscale Sidecar Configuration
2+
3+
This Docker Compose configuration sets up [EspoCRM](https://www.espocrm.com/) with Tailscale as a sidecar container to keep the app reachable over your Tailnet.
4+
5+
## EspoCRM
6+
7+
[EspoCRM](https://www.espocrm.com/) is a web application that allows users to see, enter and evaluate all your company relationships regardless of the type. People, companies, projects or opportunities — all in an easy and intuitive interface.
8+
9+
## Configuration Overview
10+
11+
In this setup, the `tailscale-EspoCRM` service runs Tailscale, which manages secure networking for EspoCRM. The `EspoCRM` service utilizes the Tailscale network stack via Docker's `network_mode: service:` configuration. This keeps the app Tailnet-only unless you intentionally expose ports.
12+
13+
## What to document for users
14+
15+
- Links: [EspoCRM Features](https://www.espocrm.com/features/) [Environment Details](https://docs.espocrm.com/administration/docker/installation/#installation-environments)
16+
17+
## Files to check
18+
19+
Please check the following contents for validity as some variables need to be defined upfront.
20+
21+
- `.env` // Main variable `TS_AUTHKEY`
22+
- `.env` // Required for normal operation. `TS_DOMAIN`

services/espocrm/compose.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
configs:
2+
ts-serve:
3+
content: |
4+
{"TCP":{"443":{"HTTPS":true}},
5+
"Web":{"$${TS_CERT_DOMAIN}:443":
6+
{"Handlers":{"/":
7+
{"Proxy":"http://127.0.0.1:80"}}}},
8+
"AllowFunnel":{"$${TS_CERT_DOMAIN}:443":false}}
9+
10+
services:
11+
# Make sure you have updated/checked the .env file with the correct variables.
12+
# All the ${ xx } need to be defined there.
13+
# Tailscale Sidecar Configuration
14+
tailscale:
15+
image: tailscale/tailscale:latest # Image to be used
16+
container_name: tailscale-${SERVICE} # Name for local container management
17+
hostname: ${SERVICE} # Name used within your Tailscale environment
18+
environment:
19+
- TS_AUTHKEY=${TS_AUTHKEY}
20+
- TS_STATE_DIR=/var/lib/tailscale
21+
- TS_SERVE_CONFIG=/config/serve.json # Tailscale Serve configuration to expose the web interface on your local Tailnet - remove this line if not required
22+
- TS_USERSPACE=false
23+
- TS_ENABLE_HEALTH_CHECK=true # Enable healthcheck endpoint: "/healthz"
24+
- TS_LOCAL_ADDR_PORT=127.0.0.1:41234 # The <addr>:<port> for the healthz endpoint
25+
#- TS_ACCEPT_DNS=true # Uncomment when using MagicDNS
26+
- TS_AUTH_ONCE=true
27+
configs:
28+
- source: ts-serve
29+
target: /config/serve.json
30+
volumes:
31+
- ./config:/config # Config folder used to store Tailscale files - you may need to change the path
32+
- ./ts/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path
33+
devices:
34+
- /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work
35+
cap_add:
36+
- net_admin # Tailscale requirement
37+
#ports:
38+
# - 0.0.0.0:${SERVICEPORT}:${SERVICEPORT} # Binding port ${SERVICE}PORT to the local network - may be removed if only exposure to your Tailnet is required
39+
# If any DNS issues arise, use your preferred DNS provider by uncommenting the config below
40+
#dns:
41+
# - ${DNS_SERVER}
42+
healthcheck:
43+
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:41234/healthz"] # Check Tailscale has a Tailnet IP and is operational
44+
interval: 1m # How often to perform the check
45+
timeout: 10s # Time to wait for the check to succeed
46+
retries: 3 # Number of retries before marking as unhealthy
47+
start_period: 10s # Time to wait before starting health checks
48+
restart: always
49+
50+
# ${SERVICE}
51+
database:
52+
image: mariadb:12.2
53+
container_name: db-${SERVICE}
54+
environment:
55+
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
56+
- MARIADB_DATABASE=${MARIADB_DATABASE}
57+
- MARIADB_USER=${MARIADB_USER}
58+
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
59+
volumes:
60+
- ./${SERVICE}-db:/var/lib/mysql
61+
restart: always
62+
healthcheck:
63+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
64+
interval: 1m
65+
start_period: 30s
66+
timeout: 10s
67+
retries: 3
68+
application:
69+
image: ${IMAGE_URL}
70+
network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale
71+
container_name: app-${SERVICE}
72+
environment:
73+
- ESPOCRM_DATABASE_PLATFORM=${ESPOCRM_DATABASE_PLATFORM}
74+
- ESPOCRM_DATABASE_HOST=${ESPOCRM_DATABASE_HOST}
75+
- ESPOCRM_DATABASE_USER=${ESPOCRM_DATABASE_USER}
76+
- ESPOCRM_DATABASE_PASSWORD=${ESPOCRM_DATABASE_PASSWORD}
77+
- ESPOCRM_ADMIN_USERNAME=${ESPOCRM_ADMIN_USERNAME}
78+
- ESPOCRM_ADMIN_PASSWORD=${ESPOCRM_ADMIN_PASSWORD}
79+
- ESPOCRM_SITE_URL=${ESPOCRM_SITE_URL}
80+
- ESPOCRM_DEFAULT_CURRENCY=${ESPOCRM_DEFAULT_CURRENCY}
81+
volumes:
82+
- ./${SERVICE}-data:/var/www/html
83+
restart: always
84+
depends_on:
85+
tailscale:
86+
condition: service_healthy
87+
database:
88+
condition: service_started

0 commit comments

Comments
 (0)