Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dev-resources/load_balanced/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ configs:
volumes:
db_data:


services:
db:
image: postgres
image: postgres:18
volumes:
- db_data:/var/lib/postgresql/data
- db_data:/var/lib/postgresql
environment:
POSTGRES_USER: lrsql_user
POSTGRES_PASSWORD: lrsql_password
Expand Down
5 changes: 3 additions & 2 deletions dev-resources/proxied_example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ configs:
volumes:
db_data:


services:
db:
image: postgres
image: postgres:18
volumes:
- db_data:/var/lib/postgresql/data
- db_data:/var/lib/postgresql
environment:
POSTGRES_USER: lrsql_user
POSTGRES_PASSWORD: lrsql_password
Expand Down
20 changes: 11 additions & 9 deletions dev-resources/superset_demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ x-superset-image: &superset-image apache/superset:latest
x-superset-depends-on: &superset-depends-on
- supersetdb
- redis
x-superset-volumes: &superset-volumes
x-superset-volumes:
# /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
&superset-volumes
- ./superset:/app/docker
- superset_home:/app/superset_home

Expand All @@ -35,12 +36,13 @@ volumes:
superset_home:
superset_db_data:


services:

db:
image: postgres
image: postgres:18
volumes:
- db_data:/var/lib/postgresql/data
- db_data:/var/lib/postgresql
environment:
POSTGRES_USER: lrsql_user
POSTGRES_PASSWORD: lrsql_password
Expand Down Expand Up @@ -84,10 +86,10 @@ services:
LRSQL_OIDC_AUDIENCE: http://localhost:8080

supersetdb:
image: postgres
image: postgres:18
container_name: superset_db
volumes:
- superset_db_data:/var/lib/postgresql/data
- superset_db_data:/var/lib/postgresql
environment:
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
Expand All @@ -104,7 +106,7 @@ services:
env_file: superset/.env
image: *superset-image
container_name: superset_app
command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn"]
command: [ "/app/docker/docker-bootstrap.sh", "app-gunicorn" ]
user: "root"
restart: unless-stopped
ports:
Expand All @@ -115,7 +117,7 @@ services:
superset-init:
image: *superset-image
container_name: superset_init
command: ["/app/docker/docker-init.sh"]
command: [ "/app/docker/docker-init.sh" ]
env_file: superset/.env
depends_on: *superset-depends-on
user: "root"
Expand All @@ -124,7 +126,7 @@ services:
superset-worker:
image: *superset-image
container_name: superset_worker
command: ["/app/docker/docker-bootstrap.sh", "worker"]
command: [ "/app/docker/docker-bootstrap.sh", "worker" ]
env_file: superset/.env
restart: unless-stopped
depends_on: *superset-depends-on
Expand All @@ -134,7 +136,7 @@ services:
superset-worker-beat:
image: *superset-image
container_name: superset_worker_beat
command: ["/app/docker/docker-bootstrap.sh", "beat"]
command: [ "/app/docker/docker-bootstrap.sh", "beat" ]
env_file: superset/.env
restart: unless-stopped
depends_on: *superset-depends-on
Expand Down
31 changes: 18 additions & 13 deletions dev-resources/tla-demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
# Example Architecture with Two Noisy LRS' and one Transactional LRS

x-lrsql-image: &lrsql_image yetanalytics/lrsql:v0.9.3
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the ampersand here, never seen that before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just the way variables are declared in docker compose files. it's super weird i know.

x-postgres-image: &postgres_image postgres:18
x-redis-image: &redis_image redis:8-alpine

volumes:
nsy_lrs_1_db_data:
nsy_lrs_2_db_data:
nsy_lrs_3_db_data:
txn_lrs_db_data:
lrspipe_storage:


services:
# Noisy LRS 1
# - Noisy LRS 1: DB
nsy_lrs_1_db:
image: postgres:14
image: *postgres_image
volumes:
- nsy_lrs_1_db_data:/var/lib/postgresql/data
- nsy_lrs_1_db_data:/var/lib/postgresql
environment:
POSTGRES_USER: lrsql_user
POSTGRES_PASSWORD: lrsql_password
POSTGRES_DB: lrsql_db
# - Noisy LRS 1: App
nsy_lrs_1:
image: yetanalytics/lrsql:v0.7.20
image: *lrsql_image
command:
- /lrsql/bin/run_postgres.sh
ports:
Expand Down Expand Up @@ -49,16 +54,16 @@ services:
# Noisy LRS 2
# - Noisy LRS 2: DB
nsy_lrs_2_db:
image: postgres:14
image: *postgres_image
volumes:
- nsy_lrs_2_db_data:/var/lib/postgresql/data
- nsy_lrs_2_db_data:/var/lib/postgresql
environment:
POSTGRES_USER: lrsql_user
POSTGRES_PASSWORD: lrsql_password
POSTGRES_DB: lrsql_db
# - Noisy LRS 2: App
nsy_lrs_2:
image: yetanalytics/lrsql:v0.7.20
image: *lrsql_image
command:
- /lrsql/bin/run_postgres.sh
ports:
Expand Down Expand Up @@ -87,16 +92,16 @@ services:
# Noisy LRS 3
# - Noisy LRS 3: DB
nsy_lrs_3_db:
image: postgres:14
image: *postgres_image
volumes:
- nsy_lrs_3_db_data:/var/lib/postgresql/data
- nsy_lrs_3_db_data:/var/lib/postgresql
environment:
POSTGRES_USER: lrsql_user
POSTGRES_PASSWORD: lrsql_password
POSTGRES_DB: lrsql_db
# - Noisy LRS 3: App
nsy_lrs_3:
image: yetanalytics/lrsql:v0.7.20
image: *lrsql_image
command:
- /lrsql/bin/run_postgres.sh
ports:
Expand Down Expand Up @@ -125,9 +130,9 @@ services:
# Transactional LRS
# - Transactional LRS: DB
txn_lrs_db:
image: postgres:14
image: *postgres_image
volumes:
- txn_lrs_db_data:/var/lib/postgresql/data
- txn_lrs_db_data:/var/lib/postgresql
environment:
POSTGRES_USER: lrsql_user
POSTGRES_PASSWORD: lrsql_password
Expand All @@ -136,7 +141,7 @@ services:
- "5431:5432"
# - Transactional LRS: App
txn_lrs:
image: yetanalytics/lrsql:v0.7.20
image: *lrsql_image
command:
- /lrsql/bin/run_postgres.sh
ports:
Expand Down Expand Up @@ -165,7 +170,7 @@ services:
# LRSPipe
# - LRSPipe: Shared Redis
redis:
image: redis:6-alpine
image: *redis_image
volumes:
- lrspipe_storage:/data
ports:
Expand Down
21 changes: 21 additions & 0 deletions dev-resources/tla-demo/test-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
API_USER=my_key
API_PASS=my_secret

BASE_STATEMENT=$(cat <<'EOF'
{
"actor": { "mbox": "mailto:learner@example.com" },
"verb": { "id": "http://adlnet.gov/expapi/verbs/experienced" },
"object": { "id": "http://example.com/activities/sample" }
}
EOF
)

for PORT in 8081 8082 8083; do
echo "Posting to LRS on port $PORT"
curl -s -o /dev/null -w "%{http_code}\n" \
-u "$API_USER:$API_PASS" \
-H "X-Experience-API-Version: 1.0.3" \
-H "Content-Type: application/json" \
-d "$BASE_STATEMENT" \
"http://localhost:${PORT}/xapi/statements"
done
Loading