Skip to content

Commit

Permalink
Merge pull request #43 from humanmade/analytics-support
Browse files Browse the repository at this point in the history
Add full config for analytics and increase memlimit on elasticsearch
  • Loading branch information
roborourke authored Jul 26, 2019
2 parents 2a9db53 + a6ad90a commit 81c3f06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 3 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ x-php: &php
S3_UPLOADS_REGION: not-needed
TACHYON_URL: https://${COMPOSE_PROJECT_NAME:-default}.altis.dev/tachyon
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
HM_ANALYTICS_PINPOINT_ENDPOINT: https://pinpoint-${COMPOSE_PROJECT_NAME:-default}.altis.dev
HM_ANALYTICS_COGNITO_ENDPOINT: https://cognito-${COMPOSE_PROJECT_NAME:-default}.altis.dev
ALTIS_ANALYTICS_PINPOINT_ENDPOINT: https://pinpoint-${COMPOSE_PROJECT_NAME:-default}.altis.dev
ALTIS_ANALYTICS_COGNITO_ENDPOINT: https://cognito-${COMPOSE_PROJECT_NAME:-default}.altis.dev

x-analytics: &analytics
ports:
Expand Down Expand Up @@ -118,8 +118,7 @@ services:
memlock:
soft: -1
hard: -1
mem_limit: "768m"
memswap_limit: "768m"
mem_limit: 1g
volumes:
- es-data:/usr/share/elasticsearch/data
ports:
Expand Down
8 changes: 6 additions & 2 deletions inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ function bootstrap() {
}

if ( $config['analytics'] ) {
define( 'HM_ANALYTICS_PINPOINT_ENDPOINT', getenv( 'HM_ANALYTICS_PINPOINT_ENDPOINT' ) );
define( 'HM_ANALYTICS_COGNITO_ENDPOINT', getenv( 'HM_ANALYTICS_COGNITO_ENDPOINT' ) );
define( 'ALTIS_ANALYTICS_PINPOINT_ID', '12345678901234567890123456' );
define( 'ALTIS_ANALYTICS_PINPOINT_REGION', 'us-east-1' );
define( 'ALTIS_ANALYTICS_COGNITO_ID', 'us-east-1:f6f6f6-fafa-f5f5-8f8f-1234567890' );
define( 'ALTIS_ANALYTICS_COGNITO_REGION', 'us-east-1' );
define( 'ALTIS_ANALYTICS_PINPOINT_ENDPOINT', getenv( 'ALTIS_ANALYTICS_PINPOINT_ENDPOINT' ) );
define( 'ALTIS_ANALYTICS_COGNITO_ENDPOINT', getenv( 'ALTIS_ANALYTICS_COGNITO_ENDPOINT' ) );
}
}

0 comments on commit 81c3f06

Please sign in to comment.