add formio compose template
This commit is contained in:
58
docker-templates/formio/.env
Normal file
58
docker-templates/formio/.env
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# #######################################################
|
||||||
|
# Templating variables, not used by compose file directly
|
||||||
|
SERVER_NAME=
|
||||||
|
SERVER_IP=
|
||||||
|
SUBDOMAIN=
|
||||||
|
SERVICE_NAME=formio
|
||||||
|
ICON_URL=https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/${SERVICE_NAME}.svg
|
||||||
|
|
||||||
|
# Include Server Name in Proxy URL? Choose one.
|
||||||
|
|
||||||
|
# PROXY_URL=${SERVICE_NAME}.${SERVER_NAME}.${SUBDOMAIN}.duckdns.org
|
||||||
|
PROXY_URL=${SERVICE_NAME}.${SUBDOMAIN}.duckdns.org
|
||||||
|
USER_EMAIL=
|
||||||
|
|
||||||
|
# #############################################################################
|
||||||
|
# Compose file variables
|
||||||
|
|
||||||
|
TZ=America/New_York
|
||||||
|
PUID=1000
|
||||||
|
PGID=1000
|
||||||
|
|
||||||
|
CONTAINER_NAME=${SERVICE_NAME}
|
||||||
|
INTERNAL_PORT=3001
|
||||||
|
EXTERNAL_PORT=3002
|
||||||
|
LOCAL_URL=http://${SERVER_IP}:${EXTERNAL_PORT}
|
||||||
|
|
||||||
|
FORMIO_JWT_SECRET=
|
||||||
|
FORMIO_DB_SECRET=
|
||||||
|
MONGO_SECRET=
|
||||||
|
|
||||||
|
# SMTP Configuration for Email Notifications
|
||||||
|
# Example for Gmail:
|
||||||
|
# SMTP_HOST=smtp.gmail.com
|
||||||
|
# SMTP_PORT=587
|
||||||
|
# SMTP_USER=your-email@gmail.com
|
||||||
|
# SMTP_PASS=your-app-specific-password
|
||||||
|
# SMTP_FROM=no-reply@${PROXY_URL}
|
||||||
|
|
||||||
|
# #############################################################
|
||||||
|
# Container Labels
|
||||||
|
|
||||||
|
# DO NOT enclose label values in single quotes
|
||||||
|
# If the value needs to include single quotes use backticks instead
|
||||||
|
|
||||||
|
# For example HOST_LABEL=traefik.http.routers.${SERVICE_NAME}.rule=Host(`${PROXY_URL}`)
|
||||||
|
# Notice the use of backticks instead of single quotes around ${PROXY_URL}
|
||||||
|
|
||||||
|
TRAEFIK_ENABLE_LABEL=traefik.enable=true
|
||||||
|
HOST_LABEL=traefik.http.routers.${SERVICE_NAME}.rule=Host(`${PROXY_URL}`)
|
||||||
|
ICON_LABEL=com.getarcaneapp.arcane.icon=${ICON_URL}
|
||||||
|
LOADBALANCER_LABEL=traefik.http.services.${SERVICE_NAME}.loadbalancer.server.port=${INTERNAL_PORT}
|
||||||
|
|
||||||
|
TRAEFIK_NETWORK_LABEL=traefik.docker.network=traefik-network
|
||||||
|
ENTRYPOINT_LABEL=traefik.http.routers.${SERVICE_NAME}.entrypoints=websecure
|
||||||
|
CERT_LABEL=traefik.http.routers.${SERVICE_NAME}.tls.certresolver=letsencrypt
|
||||||
|
|
||||||
|
AUTHELIA_LABEL=traefik.http.routers.${SERVICE_NAME}.middlewares=authelia@docker
|
||||||
|
WATCHTOWER_ENABLE_LABEL=com.centurylinklabs.watchtower.enable=true
|
||||||
116
docker-templates/formio/docker-compose.yaml
Normal file
116
docker-templates/formio/docker-compose.yaml
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
services:
|
||||||
|
formio:
|
||||||
|
image: calipseo/formio:latest
|
||||||
|
container_name: formio
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- homelab-network
|
||||||
|
- traefik-network
|
||||||
|
ports:
|
||||||
|
- ${EXTERNAL_PORT}:${INTERNAL_PORT}
|
||||||
|
environment:
|
||||||
|
- MONGO=mongodb://formio-mongo:27017/formio
|
||||||
|
- ROOT_EMAIL=${USER_EMAIL}
|
||||||
|
- ROOT_PASSWORD=${FORMIO_DB_SECRET}
|
||||||
|
- API_URL=${LOCAL_URL}
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:3001/']
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 60s
|
||||||
|
depends_on:
|
||||||
|
- formio-mongo
|
||||||
|
labels:
|
||||||
|
- com.getarcaneapp.arcane.icon=https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/microsoft-forms-2016.svg
|
||||||
|
- ${HOST_LABEL}
|
||||||
|
- ${LOADBALANCER_LABEL}
|
||||||
|
- ${WATCHTOWER_ENABLE_LABEL}
|
||||||
|
- ${TRAEFIK_ENABLE_LABEL}
|
||||||
|
- ${TRAEFIK_NETWORK_LABEL}
|
||||||
|
- ${ENTRYPOINT_LABEL}
|
||||||
|
- ${CERT_LABEL}
|
||||||
|
- ${AUTHELIA_LABEL}
|
||||||
|
|
||||||
|
formio-mongo:
|
||||||
|
image: mongo:4.4
|
||||||
|
container_name: formio-mongo
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- MONGO_SECRET=${MONGO_SECRET}
|
||||||
|
networks:
|
||||||
|
- homelab-network
|
||||||
|
volumes:
|
||||||
|
- ./mongo-db:/data/db
|
||||||
|
|
||||||
|
formio-pdf:
|
||||||
|
image: formio/pdf-server:latest
|
||||||
|
container_name: formio-pdf
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- homelab-network
|
||||||
|
ports:
|
||||||
|
- '4005:4005'
|
||||||
|
environment:
|
||||||
|
- FORMIO_SERVER=http://formio:${INTERNAL_PORT}
|
||||||
|
- FORMIO_PROJECT_ID=${FORMIO_PROJECT_ID:-}
|
||||||
|
- FORMIO_PDF_PROJECT=http://formio:${INTERNAL_PORT}
|
||||||
|
- FORMIO_PDF_PORT=4005
|
||||||
|
- MONGO=mongodb://formio-mongo:27017/formio
|
||||||
|
# For file storage - can use local or S3
|
||||||
|
# - FORMIO_S3_SERVER=
|
||||||
|
# - FORMIO_S3_BUCKET=
|
||||||
|
# - FORMIO_S3_KEY=
|
||||||
|
# - FORMIO_S3_SECRET=
|
||||||
|
depends_on:
|
||||||
|
- formio
|
||||||
|
- formio-mongo
|
||||||
|
|
||||||
|
# Uncomment and customize PDF viewer after creating the viewer files
|
||||||
|
# See PDF_VIEWER_CUSTOMIZATION.md for instructions
|
||||||
|
# volumes:
|
||||||
|
# - ./pdf-viewer:/src/node_modules/@formio/viewer/dist
|
||||||
|
|
||||||
|
formio-workflow:
|
||||||
|
build: ./workflow-service
|
||||||
|
container_name: formio-workflow
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- homelab-network
|
||||||
|
- traefik-network
|
||||||
|
ports:
|
||||||
|
- '3003:3000'
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
|
- PORT=3000
|
||||||
|
- FORMIO_API_URL=http://formio:${INTERNAL_PORT}
|
||||||
|
- FORMIO_EXTERNAL_URL=https://${PROXY_URL}
|
||||||
|
- PDF_SERVER_URL=http://formio-pdf:4005
|
||||||
|
- WORKFLOW_BASE_URL=https://${PROXY_URL}/#/publisher-completion
|
||||||
|
- MONGO_URL=mongodb://formio-mongo:27017/formio-workflow
|
||||||
|
- SMTP_HOST=${SMTP_HOST}
|
||||||
|
- SMTP_PORT=${SMTP_PORT:-587}
|
||||||
|
- SMTP_USER=${SMTP_USER}
|
||||||
|
- SMTP_PASS=${SMTP_PASS}
|
||||||
|
- SMTP_FROM=${SMTP_FROM}
|
||||||
|
depends_on:
|
||||||
|
- formio
|
||||||
|
- formio-pdf
|
||||||
|
- formio-mongo
|
||||||
|
|
||||||
|
networks:
|
||||||
|
homelab-network:
|
||||||
|
external: true
|
||||||
|
traefik-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
x-dockge:
|
||||||
|
urls:
|
||||||
|
- https://${PROXY_URL}
|
||||||
|
- ${LOCAL_URL}
|
||||||
|
|
||||||
|
x-arcane:
|
||||||
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/microsoft-forms-2016.svg
|
||||||
|
urls:
|
||||||
|
- https://${PROXY_URL}
|
||||||
|
- ${LOCAL_URL}
|
||||||
Reference in New Issue
Block a user