-
Notifications
You must be signed in to change notification settings - Fork 114
New Service Espocrm #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
michaelhodges
wants to merge
15
commits into
tailscale-dev:main
Choose a base branch
from
michaelhodges:ESPOCRM
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+150
−0
Open
New Service Espocrm #290
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0d3470a
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] 14844f6
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] 963ef66
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] 9a62ff8
Update compose.yaml
michaelhodges 78f5b61
Merge branch 'tailscale-dev:main' into tailscale-subnet-router
michaelhodges 02eeb17
New Service - EspoCRM
edea869
Merge branch 'tailscale-dev:main' into ESPOCRM
michaelhodges c459104
Merge branch 'main' into ESPOCRM
crypt0rr d34d3af
Update services/espocrm/compose.yml
michaelhodges ac212f0
Update services/espocrm/compose.yml
michaelhodges 76cf9b1
Update services/espocrm/compose.yml
michaelhodges 400f212
Update services/espocrm/compose.yml
michaelhodges 0a25feb
Update services/espocrm/compose.yml
michaelhodges 0b398f3
Update services/espocrm/compose.yml
michaelhodges 3f01b52
define mariadb version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #version=1.1 | ||
| #URL=https://github.com/tailscale-dev/ScaleTail | ||
| #COMPOSE_PROJECT_NAME= # Optional: only use when running multiple deployments on the same infrastructure. | ||
|
|
||
| # Service Configuration | ||
| SERVICE=espocrm # Service name (e.g., adguard). Used as hostname in Tailscale and for container naming (app-${SERVICE}). | ||
| IMAGE_URL=espocrm/espocrm # Docker image URL from container registry (e.g., adguard/adguard-home). | ||
|
|
||
| # Network Configuration | ||
| SERVICEPORT= # Port to expose to local network. Uncomment the "ports:" section in compose.yaml to enable. | ||
| DNS_SERVER=9.9.9.9 # Preferred DNS server for Tailscale. Uncomment the "dns:" section in compose.yaml to enable. | ||
|
|
||
| # Tailscale Configuration | ||
| TS_AUTHKEY= # Auth key from https://tailscale.com/admin/authkeys. See: https://tailscale.com/kb/1085/auth-keys#generate-an-auth-key for instructions. | ||
|
|
||
| # Optional Service variables | ||
| # PUID=1000 | ||
|
|
||
| #Time Zone setting for containers | ||
| TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
|
|
||
| # Any Container environment variables are declared below. See https://docs.docker.com/compose/how-tos/environment-variables/ | ||
|
|
||
| #EXAMPLE_VAR="Environment varibale" | ||
|
|
||
| TS_DOMAIN=<MY_TS_DOMAIN>.ts.net | ||
|
|
||
| MARIADB_ROOT_PASSWORD=password | ||
| MARIADB_DATABASE=espocrm | ||
| MARIADB_USER=espocrm | ||
| MARIADB_PASSWORD=password | ||
| ESPOCRM_DEFAULT_CURRENCY=EUR | ||
| ESPOCRM_DATABASE_PLATFORM=Mysql | ||
| ESPOCRM_DATABASE_HOST=espocrm-db | ||
| ESPOCRM_DATABASE_USER=espocrm | ||
| ESPOCRM_DATABASE_PASSWORD=password | ||
| ESPOCRM_ADMIN_USERNAME=admin | ||
| ESPOCRM_ADMIN_PASSWORD=password | ||
| ESPOCRM_SITE_URL=https://${SERVICE}.${TS_DOMAIN} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # EspoCRM with Tailscale Sidecar Configuration | ||
|
|
||
| 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. | ||
|
|
||
| ## EspoCRM | ||
|
|
||
| [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. | ||
|
|
||
| ## Configuration Overview | ||
|
|
||
| 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. | ||
|
|
||
| ## What to document for users | ||
|
|
||
| - Links: [EspoCRM Features](https://www.espocrm.com/features/) [Environment Details](https://docs.espocrm.com/administration/docker/installation/#installation-environments) | ||
|
|
||
| ## Files to check | ||
|
|
||
| Please check the following contents for validity as some variables need to be defined upfront. | ||
|
|
||
| - `.env` // Main variable `TS_AUTHKEY` | ||
| - `.env` // Required for normal operation. `TS_DOMAIN` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| configs: | ||
| ts-serve: | ||
| content: | | ||
| {"TCP":{"443":{"HTTPS":true}}, | ||
| "Web":{"$${TS_CERT_DOMAIN}:443": | ||
| {"Handlers":{"/": | ||
| {"Proxy":"http://127.0.0.1:80"}}}}, | ||
| "AllowFunnel":{"$${TS_CERT_DOMAIN}:443":false}} | ||
|
|
||
| services: | ||
| # Make sure you have updated/checked the .env file with the correct variables. | ||
| # All the ${ xx } need to be defined there. | ||
| # Tailscale Sidecar Configuration | ||
| tailscale: | ||
| image: tailscale/tailscale:latest # Image to be used | ||
| container_name: tailscale-${SERVICE} # Name for local container management | ||
| hostname: ${SERVICE} # Name used within your Tailscale environment | ||
| environment: | ||
| - TS_AUTHKEY=${TS_AUTHKEY} | ||
| - TS_STATE_DIR=/var/lib/tailscale | ||
| - TS_SERVE_CONFIG=/config/serve.json # Tailscale Serve configuration to expose the web interface on your local Tailnet - remove this line if not required | ||
| - TS_USERSPACE=false | ||
| - TS_ENABLE_HEALTH_CHECK=true # Enable healthcheck endpoint: "/healthz" | ||
| - TS_LOCAL_ADDR_PORT=127.0.0.1:41234 # The <addr>:<port> for the healthz endpoint | ||
| #- TS_ACCEPT_DNS=true # Uncomment when using MagicDNS | ||
| - TS_AUTH_ONCE=true | ||
| configs: | ||
| - source: ts-serve | ||
| target: /config/serve.json | ||
| volumes: | ||
| - ./config:/config # Config folder used to store Tailscale files - you may need to change the path | ||
| - ./ts/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path | ||
| devices: | ||
| - /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work | ||
| cap_add: | ||
| - net_admin # Tailscale requirement | ||
| #ports: | ||
| # - 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 | ||
| # If any DNS issues arise, use your preferred DNS provider by uncommenting the config below | ||
| #dns: | ||
| # - ${DNS_SERVER} | ||
| healthcheck: | ||
| test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:41234/healthz"] # Check Tailscale has a Tailnet IP and is operational | ||
| interval: 1m # How often to perform the check | ||
| timeout: 10s # Time to wait for the check to succeed | ||
| retries: 3 # Number of retries before marking as unhealthy | ||
| start_period: 10s # Time to wait before starting health checks | ||
| restart: always | ||
|
|
||
| # ${SERVICE} | ||
| espocrm-db: | ||
| image: mariadb:latest | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might want to change this to a specific version. If there's a major version update to mariadb, and you re-pull the container, it's possible issues will occur. I'm not familiar with the upgrade progress for a mariadb docker container. |
||
| container_name: app-${SERVICE}-db | ||
|
michaelhodges marked this conversation as resolved.
Outdated
|
||
| environment: | ||
| - MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD} | ||
| - MARIADB_DATABASE=${MARIADB_DATABASE} | ||
| - MARIADB_USER=${MARIADB_USER} | ||
| - MARIADB_PASSWORD=${MARIADB_PASSWORD} | ||
| volumes: | ||
| - ./${SERVICE}-db:/var/lib/mysql | ||
| restart: always | ||
| healthcheck: | ||
| test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] | ||
| interval: 20s | ||
|
michaelhodges marked this conversation as resolved.
Outdated
|
||
| start_period: 10s | ||
|
michaelhodges marked this conversation as resolved.
Outdated
|
||
| timeout: 10s | ||
| retries: 3 | ||
| espocrm: | ||
|
michaelhodges marked this conversation as resolved.
Outdated
|
||
| image: ${IMAGE_URL} | ||
| network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale | ||
| container_name: app-${SERVICE} | ||
| environment: | ||
| - ESPOCRM_DATABASE_PLATFORM=${ESPOCRM_DATABASE_PLATFORM} | ||
| - ESPOCRM_DATABASE_HOST=${ESPOCRM_DATABASE_HOST} | ||
| - ESPOCRM_DATABASE_USER=${ESPOCRM_DATABASE_USER} | ||
| - ESPOCRM_DATABASE_PASSWORD=${ESPOCRM_DATABASE_PASSWORD} | ||
| - ESPOCRM_ADMIN_USERNAME=${ESPOCRM_ADMIN_USERNAME} | ||
| - ESPOCRM_ADMIN_PASSWORD=${ESPOCRM_ADMIN_PASSWORD} | ||
| - ESPOCRM_SITE_URL=${ESPOCRM_SITE_URL} | ||
| - ESPOCRM_DEFAULT_CURRENCY=${ESPOCRM_DEFAULT_CURRENCY} | ||
| volumes: | ||
| - ./${SERVICE}-data:/var/www/html | ||
| restart: always | ||
| depends_on: | ||
| tailscale: | ||
| condition: service_healthy | ||
| espocrm-db: | ||
|
michaelhodges marked this conversation as resolved.
Outdated
|
||
| condition: service_started | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.