|
| 1 | +name:lowcoder-ce |
| 2 | + |
| 3 | +services: |
| 4 | + |
| 5 | +## |
| 6 | +## Start services required for Lowcoder (MongoDB and Redis) |
| 7 | +## |
| 8 | +mongodb: |
| 9 | +image:"mongo:7.0" |
| 10 | +container_name:mongodb |
| 11 | +environment: |
| 12 | +MONGO_INITDB_DATABASE:lowcoder |
| 13 | +MONGO_INITDB_ROOT_USERNAME:lowcoder |
| 14 | +MONGO_INITDB_ROOT_PASSWORD:secret123 |
| 15 | +volumes: |
| 16 | + -./lowcoder-stacks/data/mongodb:/data/db |
| 17 | +restart:unless-stopped |
| 18 | +healthcheck:# https://github.com/rodrigobdz/docker-compose-healthchecks?tab=readme-ov-file#mongo |
| 19 | +test: |
| 20 | +[ |
| 21 | +"CMD", |
| 22 | +"mongosh", |
| 23 | +"--quiet", |
| 24 | +"127.0.0.1/test", |
| 25 | +"--eval", |
| 26 | +"'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'", |
| 27 | +] |
| 28 | +interval:5s |
| 29 | +timeout:10s |
| 30 | +retries:10 |
| 31 | +start_period:40s |
| 32 | + |
| 33 | +redis: |
| 34 | +image:redis:7-alpine |
| 35 | +container_name:redis |
| 36 | +restart:unless-stopped |
| 37 | +healthcheck:# https://stackoverflow.com/a/71504657 |
| 38 | +test:["CMD-SHELL", "redis-cli ping | grep PONG"] |
| 39 | +interval:1s |
| 40 | +timeout:3s |
| 41 | +retries:10 |
| 42 | + |
| 43 | + |
| 44 | +## |
| 45 | +## Start Lowcoder backend services (api-service and node-service) |
| 46 | +## |
| 47 | +lowcoder-api-service: |
| 48 | +image:lowcoder-ce-api-service-jmc:latest |
| 49 | +container_name:lowcoder-api-service |
| 50 | +# Enabled ports to be able to access backend from host |
| 51 | +# ports: |
| 52 | +# - "8080:8080" |
| 53 | +environment: |
| 54 | +LOWCODER_PUBLIC_URL:"http://localhost:3000/" |
| 55 | +LOWCODER_PUID:"9001" |
| 56 | +LOWCODER_PGID:"9001" |
| 57 | +LOWCODER_MONGODB_URL:"mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin" |
| 58 | +LOWCODER_REDIS_URL:"redis://redis:6379" |
| 59 | +LOWCODER_NODE_SERVICE_URL:"http://lowcoder-node-service:6060" |
| 60 | +LOWCODER_MAX_QUERY_TIMEOUT:120 |
| 61 | +LOWCODER_MAX_REQUEST_SIZE:20m |
| 62 | +LOWCODER_EMAIL_AUTH_ENABLED:"true" |
| 63 | +LOWCODER_EMAIL_SIGNUP_ENABLED:"true" |
| 64 | +LOWCODER_CREATE_WORKSPACE_ON_SIGNUP:"true" |
| 65 | +# |
| 66 | +# ! PLEASE CHANGE THESE TO SOMETHING UNIQUE ! |
| 67 | +# |
| 68 | +# LOWCODER_DB_ENCRYPTION_PASSWORD and LOWCODER_DB_ENCRYPTION_SALT is used |
| 69 | +# to encrypt sensitive data in database so it is important to change the defaults |
| 70 | +# |
| 71 | +LOWCODER_DB_ENCRYPTION_PASSWORD:"lowcoder.org" |
| 72 | +LOWCODER_DB_ENCRYPTION_SALT:"lowcoder.org" |
| 73 | +LOWCODER_CORS_DOMAINS:"*" |
| 74 | +LOWCODER_MAX_ORGS_PER_USER:100 |
| 75 | +LOWCODER_MAX_MEMBERS_PER_ORG:1000 |
| 76 | +LOWCODER_MAX_GROUPS_PER_ORG:100 |
| 77 | +LOWCODER_MAX_APPS_PER_ORG:1000 |
| 78 | +LOWCODER_MAX_DEVELOPERS:50 |
| 79 | +# |
| 80 | +# API-KEY secret - should be a string of at least 32 random characters |
| 81 | +# - on linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256 |
| 82 | +# |
| 83 | +LOWCODER_API_KEY_SECRET:"5a41b090758b39b226603177ef48d73ae9839dd458ccb7e66f7e7cc028d5a50b" |
| 84 | +LOWCODER_PLUGINS_DIR:"../plugins" |
| 85 | +LOWCODER_API_RATE_LIMIT:50 |
| 86 | +LOWCODER_WORKSPACE_MODE:SAAS |
| 87 | +LOWCODER_MARKETPLACE_PRIVATE_MODE:"true" |
| 88 | +# Lowcoder notification emails setup |
| 89 | +LOWCODER_ADMIN_SMTP_HOST:smtp.gmail.com |
| 90 | +LOWCODER_ADMIN_SMTP_PORT:587 |
| 91 | +LOWCODER_ADMIN_SMTP_USERNAME: |
| 92 | +LOWCODER_ADMIN_SMTP_PASSWORD: |
| 93 | +LOWCODER_ADMIN_SMTP_AUTH:"true" |
| 94 | +LOWCODER_ADMIN_SMTP_SSL_ENABLED:"false" |
| 95 | +LOWCODER_ADMIN_SMTP_STARTTLS_ENABLED:"true" |
| 96 | +LOWCODER_ADMIN_SMTP_STARTTLS_REQUIRED:"true" |
| 97 | +# Email used as sender in lost password email |
| 98 | +LOWCODER_EMAIL_NOTIFICATIONS_SENDER:info@localhost |
| 99 | +# Lowcoder superuser details |
| 100 | +LOWCODER_SUPERUSER_USERNAME:admin@localhost |
| 101 | +# If left blank, a password will be generated and written into api-service log |
| 102 | +LOWCODER_SUPERUSER_PASSWORD: |
| 103 | + |
| 104 | +# OpenTelemetry Related Settings |
| 105 | +# OTEL_JAVAAGENT_ENABLED: "false" |
| 106 | +OTEL_RESOURCE_ATTRIBUTES:"service.name=lowcoder-api-service,service.version=2.6.5,deployment.environment=production" |
| 107 | +OTEL_SERVICE_NAME:"lowcoder-api-service" |
| 108 | +OTEL_EXPORTER_OTLP_PROTOCOL:"grpc" |
| 109 | +OTEL_EXPORTER_OTLP_ENDPOINT:"http://otel-lgtm:4317" |
| 110 | +OTEL_TRACES_EXPORTER:"otlp" |
| 111 | +OTEL_METRICS_EXPORTER:"otlp" |
| 112 | +OTEL_LOGS_EXPORTER:"otlp" |
| 113 | + |
| 114 | + |
| 115 | +restart:unless-stopped |
| 116 | +depends_on: |
| 117 | +mongodb: |
| 118 | +condition:service_healthy |
| 119 | +restart:true |
| 120 | +redis: |
| 121 | +condition:service_healthy |
| 122 | +restart:true |
| 123 | +otel-lgtm: |
| 124 | +condition:service_healthy |
| 125 | +restart:true |
| 126 | +volumes: |
| 127 | + -./lowcoder-stacks:/lowcoder-stacks |
| 128 | + -./lowcoder-stacks/assets:/lowcoder/assets |
| 129 | +healthcheck:#https://stackoverflow.com/questions/71101967/how-should-i-use-grep-in-docker-compose-healthcheck |
| 130 | +test:curl -sS http://lowcoder-api-service:8080 | grep -c "Lowcoder API is up and runnig" > /dev/null |
| 131 | +interval:3s |
| 132 | +timeout:5s |
| 133 | +retries:10 |
| 134 | + |
| 135 | + |
| 136 | +lowcoder-node-service: |
| 137 | +image:lowcoder-ce-node-service-jmc:latest |
| 138 | +container_name:lowcoder-node-service |
| 139 | +# Enabled ports to be able to access backend from host |
| 140 | +# ports: |
| 141 | +# - "6060:6060" |
| 142 | +environment: |
| 143 | +LOWCODER_PUID:"9001" |
| 144 | +LOWCODER_PGID:"9001" |
| 145 | +LOWCODER_API_SERVICE_URL:"http://lowcoder-api-service:8080" |
| 146 | +restart:unless-stopped |
| 147 | +depends_on: |
| 148 | +lowcoder-api-service: |
| 149 | +condition:service_healthy |
| 150 | +restart:true |
| 151 | +healthcheck:#https://stackoverflow.com/questions/71101967/how-should-i-use-grep-in-docker-compose-healthcheck |
| 152 | +test:curl -sS http://lowcoder-node-service:6060 | grep -c "Lowcoder Node Service is up and running" > /dev/null |
| 153 | +interval:3s |
| 154 | +timeout:5s |
| 155 | +retries:10 |
| 156 | + |
| 157 | +## |
| 158 | +## Start Lowcoder web frontend |
| 159 | +## |
| 160 | +lowcoder-frontend: |
| 161 | +image:lowcoder-ce-frontend-jmc:latest |
| 162 | +container_name:lowcoder-frontend |
| 163 | +ports: |
| 164 | + -"3000:3000" |
| 165 | +environment: |
| 166 | +LOWCODER_PUID:"9001" |
| 167 | +LOWCODER_PGID:"9001" |
| 168 | +LOWCODER_MAX_REQUEST_SIZE:20m |
| 169 | +LOWCODER_MAX_QUERY_TIMEOUT:120 |
| 170 | +LOWCODER_API_SERVICE_URL:"http://lowcoder-api-service:8080" |
| 171 | +LOWCODER_NODE_SERVICE_URL:"http://lowcoder-node-service:6060" |
| 172 | +restart:unless-stopped |
| 173 | +depends_on: |
| 174 | +lowcoder-node-service: |
| 175 | +condition:service_healthy |
| 176 | +restart:true |
| 177 | +lowcoder-api-service: |
| 178 | +condition:service_healthy |
| 179 | +restart:true |
| 180 | +volumes: |
| 181 | + -./lowcoder-stacks/assets:/lowcoder/assets |
| 182 | +healthcheck: |
| 183 | +test:curl --fail http://lowcoder-frontend:3000 || exit 1 |
| 184 | +interval:5s |
| 185 | +retries:10 |
| 186 | +start_period:10s |
| 187 | +timeout:10s |
| 188 | +otel-lgtm: |
| 189 | +image:grafana/otel-lgtm:latest |
| 190 | +container_name:otel-lgtm |
| 191 | +ports: |
| 192 | + -"3001:3000"# Grafana UI |
| 193 | + -"4317:4317"# OTLP gRPC receiver |
| 194 | + -"4318:4318"# OTLP HTTP receiver |
| 195 | + -"9090:9090"# Prometheus / Mimir |
| 196 | + -"3100:3100"# Loki |
| 197 | + -"3200:3200"# Tempo |
| 198 | +volumes: |
| 199 | + -./otel-lgtm-data:/data# Persistent storage for Grafana, Loki, Tempo, Mimir |
| 200 | +healthcheck: |
| 201 | +test:["CMD", "curl", "-f", "http://localhost:3001/api/health"]# Check Grafana UI health |
| 202 | +interval:10s |
| 203 | +timeout:5s |
| 204 | +retries:5 |
| 205 | +start_period:30s# Give it some time to start up initially |