2022-04-11 22:57:34 +07:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
lago_postgres_data:
|
|
|
|
lago_redis_data:
|
2022-09-28 20:07:31 +07:00
|
|
|
lago_storage_data:
|
2022-04-11 22:57:34 +07:00
|
|
|
|
|
|
|
services:
|
|
|
|
db:
|
|
|
|
image: postgres:14.0-alpine
|
|
|
|
container_name: lago-db
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: ${POSTGRES_DB:-lago}
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-lago}
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
|
|
|
PGDATA: /data/postgres
|
|
|
|
volumes:
|
|
|
|
- lago_postgres_data:/data/postgres
|
|
|
|
ports:
|
|
|
|
- ${POSTGRES_PORT:-5432}:5432
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:6.2-alpine
|
|
|
|
container_name: lago-redis
|
|
|
|
restart: unless-stopped
|
2023-02-24 21:42:57 +07:00
|
|
|
command: --port ${REDIS_PORT:-6379}
|
2022-04-11 22:57:34 +07:00
|
|
|
volumes:
|
|
|
|
- lago_redis_data:/data
|
|
|
|
ports:
|
2023-02-24 21:42:57 +07:00
|
|
|
- ${REDIS_PORT:-6379}:${REDIS_PORT:-6379}
|
2022-04-11 22:57:34 +07:00
|
|
|
|
|
|
|
api:
|
|
|
|
container_name: lago-api
|
2023-07-06 19:59:59 +07:00
|
|
|
image: getlago/api:v0.39.0-beta
|
2022-04-11 22:57:34 +07:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
command: ["./scripts/start.sh"]
|
|
|
|
environment:
|
2022-08-11 21:37:33 +07:00
|
|
|
- LAGO_API_URL=${LAGO_API_URL:-http://localhost:3000}
|
2022-05-12 14:50:29 +07:00
|
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}
|
|
|
|
- REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}
|
2022-12-01 02:08:06 +07:00
|
|
|
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
2022-04-11 22:57:34 +07:00
|
|
|
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
|
|
|
|
- RAILS_ENV=production
|
2022-09-29 22:53:52 +07:00
|
|
|
- RAILS_LOG_TO_STDOUT=${LAGO_RAILS_STDOUT:-true}
|
2022-04-29 16:21:13 +07:00
|
|
|
- SENTRY_DSN=${SENTRY_DSN}
|
2022-05-12 14:50:29 +07:00
|
|
|
- LAGO_FRONT_URL=${LAGO_FRONT_URL:-http://localhost}
|
2022-07-12 21:37:28 +07:00
|
|
|
- RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
|
2022-07-08 20:54:31 +07:00
|
|
|
- LAGO_RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
|
2022-06-02 17:22:05 +07:00
|
|
|
- LAGO_SIDEKIQ_WEB=${LAGO_SIDEKIQ_WEB}
|
2022-06-14 17:25:14 +07:00
|
|
|
- ENCRYPTION_PRIMARY_KEY=${LAGO_ENCRYPTION_PRIMARY_KEY:-your-encrpytion-primary-key}
|
|
|
|
- ENCRYPTION_DETERMINISTIC_KEY=${LAGO_ENCRYPTION_DETERMINISTIC_KEY:-your-encrpytion-deterministic-key}
|
2022-06-23 15:08:46 +07:00
|
|
|
- ENCRYPTION_KEY_DERIVATION_SALT=${LAGO_ENCRYPTION_KEY_DERIVATION_SALT:-your-encrpytion-derivation-salt}
|
2022-07-12 21:37:28 +07:00
|
|
|
- LAGO_USE_AWS_S3=${LAGO_USE_AWS_S3:-false}
|
|
|
|
- LAGO_AWS_S3_ACCESS_KEY_ID=${LAGO_AWS_S3_ACCESS_KEY_ID:-azerty123456}
|
|
|
|
- LAGO_AWS_S3_SECRET_ACCESS_KEY=${LAGO_AWS_S3_SECRET_ACCESS_KEY:-azerty123456}
|
|
|
|
- LAGO_AWS_S3_REGION=${LAGO_AWS_S3_REGION:-us-east-1}
|
|
|
|
- LAGO_AWS_S3_BUCKET=${LAGO_AWS_S3_BUCKET:-bucket}
|
2022-08-12 16:19:00 +07:00
|
|
|
- LAGO_AWS_S3_ENDPOINT=${LAGO_AWS_S3_ENDPOINT}
|
2022-10-12 21:08:37 +07:00
|
|
|
- LAGO_USE_GCS=${LAGO_USE_GCS:-false}
|
|
|
|
- LAGO_GCS_PROJECT=${LAGO_GCS_PROJECT:-}
|
|
|
|
- LAGO_GCS_BUCKET=${LAGO_GCS_BUCKET:-}
|
2022-07-05 20:31:37 +07:00
|
|
|
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
|
2022-07-07 21:45:18 +07:00
|
|
|
- LAGO_REDIS_CACHE_URL=redis://${LAGO_REDIS_CACHE_HOST:-redis}:${LAGO_REDIS_CACHE_PORT:-6379}
|
2022-12-01 02:08:06 +07:00
|
|
|
- LAGO_REDIS_CACHE_PASSWORD=${LAGO_REDIS_CACHE_PASSWORD}
|
2022-07-21 15:41:26 +07:00
|
|
|
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT}
|
2022-12-02 17:09:16 +07:00
|
|
|
- LAGO_OAUTH_PROXY_URL=https://proxy.getlago.com
|
2023-01-05 22:43:54 +07:00
|
|
|
- LAGO_LICENSE=${LAGO_LICENSE:-}
|
2022-09-28 20:07:31 +07:00
|
|
|
volumes:
|
|
|
|
- lago_storage_data:/app/storage
|
2022-10-12 21:08:37 +07:00
|
|
|
# If using GCS, you need to put the credentials keyfile here
|
|
|
|
#- gcs_keyfile.json:/app/gcs_keyfile.json
|
2022-04-11 22:57:34 +07:00
|
|
|
ports:
|
|
|
|
- ${API_PORT:-3000}:3000
|
|
|
|
|
|
|
|
front:
|
|
|
|
container_name: lago-front
|
2023-07-06 19:59:59 +07:00
|
|
|
image: getlago/front:v0.39.0-beta
|
2022-04-11 22:57:34 +07:00
|
|
|
restart: unless-stopped
|
2022-07-26 16:52:08 +07:00
|
|
|
# Use this command if you want to use SSL with Let's Encrypt
|
|
|
|
# command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
2022-04-11 22:57:34 +07:00
|
|
|
depends_on:
|
|
|
|
- api
|
|
|
|
environment:
|
2022-05-12 14:50:29 +07:00
|
|
|
- API_URL=${LAGO_API_URL:-http://localhost:3000}
|
2022-04-11 22:57:34 +07:00
|
|
|
- APP_ENV=${APP_ENV:-production}
|
2022-05-12 14:50:29 +07:00
|
|
|
- CODEGEN_API=${LAGO_API_URL:-http://localhost:3000}
|
2022-09-22 16:22:52 +07:00
|
|
|
- LAGO_DISABLE_SIGNUP=${LAGO_DISABLE_SIGNUP:-false}
|
2022-11-30 15:53:00 +07:00
|
|
|
- LAGO_OAUTH_PROXY_URL=https://proxy.getlago.com
|
2023-03-16 17:29:51 +07:00
|
|
|
- SENTRY_DSN=${SENTRY_DSN_FRONT}
|
2022-04-11 22:57:34 +07:00
|
|
|
ports:
|
|
|
|
- ${FRONT_PORT:-80}:80
|
2022-10-12 21:08:37 +07:00
|
|
|
# - 443:443
|
2022-07-26 16:52:08 +07:00
|
|
|
# Using SSL with Let's Encrypt
|
|
|
|
# volumes:
|
|
|
|
# - ./extra/nginx-letsencrypt.conf:/etc/nginx/conf.d/default.conf
|
|
|
|
# - ./extra/certbot/conf:/etc/letsencrypt
|
|
|
|
# - ./extra/certbot/www:/var/www/certbot
|
|
|
|
# Using SSL with self signed certificates
|
|
|
|
# volumes:
|
|
|
|
# - ./extra/nginx-selfsigned.conf:/etc/nginx/conf.d/default.conf
|
|
|
|
# - ./extra/ssl/nginx-selfsigned.crt:/etc/ssl/certs/nginx-selfsigned.crt
|
|
|
|
# - ./extra/ssl/nginx-selfsigned.key:/etc/ssl/private/nginx-selfsigned.key
|
|
|
|
# - ./extra/ssl/dhparam.pem:/etc/ssl/certs/dhparam.pem
|
|
|
|
|
|
|
|
# Only used for SSL support with Let's Encrypt
|
2022-10-12 21:08:37 +07:00
|
|
|
# certbot:
|
|
|
|
# image: certbot/certbot
|
|
|
|
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
|
|
|
# volumes:
|
|
|
|
# - ./extra/certbot/conf:/etc/letsencrypt
|
|
|
|
# - ./extra/certbot/www:/var/www/certbot
|
2022-04-11 22:57:34 +07:00
|
|
|
|
|
|
|
api-worker:
|
|
|
|
container_name: lago-worker
|
2023-07-06 19:59:59 +07:00
|
|
|
image: getlago/api:v0.39.0-beta
|
2022-04-11 22:57:34 +07:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
- api
|
|
|
|
command: ["./scripts/start.worker.sh"]
|
|
|
|
environment:
|
2022-05-12 14:50:29 +07:00
|
|
|
- LAGO_API_URL=${LAGO_API_URL:-http://localhost:3000}
|
|
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}
|
|
|
|
- REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}
|
2022-12-01 02:08:06 +07:00
|
|
|
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
2022-04-11 22:57:34 +07:00
|
|
|
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
|
|
|
|
- RAILS_ENV=production
|
2022-09-29 22:53:52 +07:00
|
|
|
- RAILS_LOG_TO_STDOUT=${LAGO_RAILS_STDOUT:-true}
|
2022-04-29 16:21:13 +07:00
|
|
|
- SENTRY_DSN=${SENTRY_DSN}
|
2022-07-08 20:54:31 +07:00
|
|
|
- LAGO_RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
|
2022-07-12 21:37:28 +07:00
|
|
|
- RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
|
2022-06-14 17:25:14 +07:00
|
|
|
- ENCRYPTION_PRIMARY_KEY=${LAGO_ENCRYPTION_PRIMARY_KEY:-your-encrpytion-primary-key}
|
|
|
|
- ENCRYPTION_DETERMINISTIC_KEY=${LAGO_ENCRYPTION_DETERMINISTIC_KEY:-your-encrpytion-deterministic-key}
|
2022-06-23 15:08:46 +07:00
|
|
|
- ENCRYPTION_KEY_DERIVATION_SALT=${LAGO_ENCRYPTION_KEY_DERIVATION_SALT:-your-encrpytion-derivation-salt}
|
2023-03-31 17:11:16 +07:00
|
|
|
- LAGO_FRONT_URL=${LAGO_FRONT_URL:-http://localhost}
|
2022-07-12 21:37:28 +07:00
|
|
|
- LAGO_USE_AWS_S3=${LAGO_USE_AWS_S3:-false}
|
|
|
|
- LAGO_AWS_S3_ACCESS_KEY_ID=${LAGO_AWS_S3_ACCESS_KEY_ID:-azerty123456}
|
|
|
|
- LAGO_AWS_S3_SECRET_ACCESS_KEY=${LAGO_AWS_S3_SECRET_ACCESS_KEY:-azerty123456}
|
|
|
|
- LAGO_AWS_S3_REGION=${LAGO_AWS_S3_REGION:-us-east-1}
|
|
|
|
- LAGO_AWS_S3_BUCKET=${LAGO_AWS_S3_BUCKET:-bucket}
|
2022-08-12 16:19:00 +07:00
|
|
|
- LAGO_AWS_S3_ENDPOINT=${LAGO_AWS_S3_ENDPOINT}
|
2022-10-12 21:08:37 +07:00
|
|
|
- LAGO_USE_GCS=${LAGO_USE_GCS:-false}
|
|
|
|
- LAGO_GCS_PROJECT=${LAGO_GCS_PROJECT:-}
|
|
|
|
- LAGO_GCS_BUCKET=${LAGO_GCS_BUCKET:-}
|
2022-07-05 20:31:37 +07:00
|
|
|
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
|
2022-07-07 21:45:18 +07:00
|
|
|
- LAGO_REDIS_CACHE_URL=redis://${LAGO_REDIS_CACHE_HOST:-redis}:${LAGO_REDIS_CACHE_PORT:-6379}
|
2022-12-01 02:08:06 +07:00
|
|
|
- LAGO_REDIS_CACHE_PASSWORD=${LAGO_REDIS_CACHE_PASSWORD}
|
2022-07-21 15:41:26 +07:00
|
|
|
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT}
|
2022-09-28 20:07:31 +07:00
|
|
|
volumes:
|
|
|
|
- lago_storage_data:/app/storage
|
2022-04-11 22:57:34 +07:00
|
|
|
|
|
|
|
api-clock:
|
|
|
|
container_name: lago-clock
|
2023-07-06 19:59:59 +07:00
|
|
|
image: getlago/api:v0.39.0-beta
|
2022-04-11 22:57:34 +07:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
- api
|
|
|
|
command: ["./scripts/start.clock.sh"]
|
|
|
|
environment:
|
2022-05-12 14:50:29 +07:00
|
|
|
- LAGO_API_URL=${LAGO_API_URL:-http://localhost:3000}
|
|
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}
|
|
|
|
- REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}
|
2022-12-01 02:08:06 +07:00
|
|
|
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
2022-04-11 22:57:34 +07:00
|
|
|
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
|
|
|
|
- RAILS_ENV=production
|
2022-09-29 22:53:52 +07:00
|
|
|
- RAILS_LOG_TO_STDOUT=${LAGO_RAILS_STDOUT:-true}
|
2022-04-29 16:21:13 +07:00
|
|
|
- SENTRY_DSN=${SENTRY_DSN}
|
2022-07-08 20:54:31 +07:00
|
|
|
- LAGO_RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
|
2022-07-12 21:37:28 +07:00
|
|
|
- RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
|
2022-06-14 17:25:14 +07:00
|
|
|
- ENCRYPTION_PRIMARY_KEY=${LAGO_ENCRYPTION_PRIMARY_KEY:-your-encrpytion-primary-key}
|
|
|
|
- ENCRYPTION_DETERMINISTIC_KEY=${LAGO_ENCRYPTION_DETERMINISTIC_KEY:-your-encrpytion-deterministic-key}
|
2022-06-23 15:08:46 +07:00
|
|
|
- ENCRYPTION_KEY_DERIVATION_SALT=${LAGO_ENCRYPTION_KEY_DERIVATION_SALT:-your-encrpytion-derivation-salt}
|
2022-07-05 20:31:37 +07:00
|
|
|
|
|
|
|
pdf:
|
2022-09-06 20:28:02 +07:00
|
|
|
image: getlago/lago-gotenberg:7
|