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
2 changes: 0 additions & 2 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ MYSQL_PORT=3306
PHPMYADMIN_PORT=8031

STATSD_PORT=8125
JAEGER_HTTP_PORT=14268
JAEGER_UDP_PORT=6832
OTLP_GRPC_PORT=4317
OTLP_HTTP_PORT=4318
JAEGER_UI_PORT=8034
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: e2e

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
docker system prune -af

- name: Run e2e tests
run: make test
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ install:
@echo "Creating network..."
@stack network
@echo "🧱 Installed. Happy hacking!"

.PHONY: test
test:
@bash $(STACK_PATH)/tests/run-all.sh
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/opencodeco/stack/main/in
| `stack mysql`| MySQL & phpMyAdmin (http://localhost:8031) |
| `stack redis` | Redis & RedisInsight (http://localhost:8032) |
| `stack mongo` | MongoDB & Mongo Express (http://localhost:8033) |
| `stack postgres` | PostgreSQL & pgAdmin (http://localhost:8034) |
| `stack postgres` | PostgreSQL & pgAdmin (http://localhost:8039) |
| `stack kafka` | Kafka and UI for Apache Kafka (http://localhost:8037) |
| `stack rabbitmq` | RabbitMQ & Management Plugin (http://localhost:8038) |
| `stack aws` | AWS services via LocalStack _(legacy, [see details below](#aws-localstack-vs-ministack))_ (http://localhost:4566) |
Expand All @@ -29,8 +29,6 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/opencodeco/stack/main/in

| Component | Description | Port |
| --- | --- | --- |
| OpenTelemetry Collector | Jaeger HTTP | `14268` |
| OpenTelemetry Collector | Jaeger UDP | `6832` |
| OpenTelemetry Collector | Statsd UDP | `8125` |
| OpenTelemetry Collector | OTLP gRPC | `4317` |
| OpenTelemetry Collector | OTLP HTTP | `4318` |
Expand Down Expand Up @@ -77,7 +75,7 @@ stack mysql up -d
```
Which does a:
```shell
docker-compose -d mysql/docker-compose.yml up -d
docker-compose -f mysql/docker-compose.yml up -d
```
Behind the scenes.

Expand Down Expand Up @@ -109,3 +107,5 @@ stack mysql logs -f
---

⚠️ **Remember:** this is suited for development environments only.

> **Note on upgrades:** Major version upgrades for MySQL (8→9), MongoDB (6→8), and RabbitMQ (3→4) may require recreating volumes if you have existing data. Run `stack <component> down -v` to remove volumes before upgrading.
2 changes: 1 addition & 1 deletion aws/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
opencodeco-aws:
container_name: opencodeco-aws
image: localstack/localstack:2.2.0
image: localstack/localstack:4.14.0
ports:
- ${AWS_PORT}:4566

Expand Down
2 changes: 1 addition & 1 deletion hyperdx/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
opencodeco-hyperx:
container_name: opencodeco-hyperx
image: hyperdx/hyperdx-local
image: hyperdx/hyperdx-local:2.23.2
ports:
- ${HYPERDX_API_PORT}:8000
- ${HYPERDX_APP_PORT}:8080
Expand Down
30 changes: 20 additions & 10 deletions kafka/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
services:
opencodeco-kafka:
container_name: opencodeco-kafka
image: bitnami/kafka:3.5
image: apache/kafka:3.9.0
ports:
- ${KAFKA_PORT}:9092
volumes:
- opencodeco-kafka:/bitnami
- opencodeco-kafka:/var/lib/kafka/data
environment:
- KAFKA_CFG_NODE_ID=0
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@opencodeco-kafka:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_NODE_ID=1
- KAFKA_PROCESS_ROLES=broker,controller
- KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://opencodeco-kafka:9092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@opencodeco-kafka:9093
- KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
- KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092 > /dev/null 2>&1"]
interval: 15s
timeout: 10s
retries: 5

opencodeco-kafka-ui:
container_name: opencodeco-kafka-ui
image: provectuslabs/kafka-ui:latest
image: ghcr.io/kafbat/kafka-ui:v1.4.2
ports:
- ${KAFKA_UI_PORT}:8080
depends_on:
- opencodeco-kafka
opencodeco-kafka:
condition: service_healthy
environment:
DYNAMIC_CONFIG_ENABLED: 'true'
volumes:
Expand Down
12 changes: 9 additions & 3 deletions mongo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
services:
opencodeco-mongo:
container_name: opencodeco-mongo
image: mongo:6.0
image: mongo:8.0
ports:
- ${MONGO_PORT}:27017
volumes:
- opencodeco-mongo:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand('ping').ok", "--quiet"]
interval: 10s
timeout: 5s
retries: 5

opencodeco-mongo-express:
container_name: opencodeco-mongo-express
image: mongo-express:1.0.0-alpha
image: mongo-express:1.0.2
ports:
- ${MONGO_EXPRESS_PORT}:8081
environment:
ME_CONFIG_MONGODB_URL: mongodb://opencodeco-mongo:27017/
depends_on:
- opencodeco-mongo
opencodeco-mongo:
condition: service_healthy

networks:
default:
Expand Down
11 changes: 9 additions & 2 deletions mysql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
services:
opencodeco-mysql:
container_name: opencodeco-mysql
image: mysql:8.1
command: --default-authentication-plugin=mysql_native_password
image: mysql:9.3
ports:
- ${MYSQL_PORT}:3306
environment:
MYSQL_ROOT_PASSWORD: opencodeco
volumes:
- opencodeco-mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-popencodeco"]
interval: 10s
timeout: 5s
retries: 5

opencodeco-phpmyadmin:
container_name: opencodeco-phpmyadmin
Expand All @@ -17,6 +21,9 @@ services:
- ${PHPMYADMIN_PORT}:80
environment:
- PMA_HOST=opencodeco-mysql
depends_on:
opencodeco-mysql:
condition: service_healthy

networks:
default:
Expand Down
10 changes: 4 additions & 6 deletions o11y/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
services:
opencodeco-otelcol:
container_name: opencodeco-otelcol
image: otel/opentelemetry-collector-contrib:0.95.0
image: otel/opentelemetry-collector-contrib:0.123.0
volumes:
- ./otelcol-config.yml:/etc/otelcol-contrib/config.yaml
ports:
- ${JAEGER_HTTP_PORT}:14268
- ${JAEGER_UDP_PORT}:6832/udp
- ${STATSD_PORT}:8125/udp
- ${OTLP_GRPC_PORT}:4317
- ${OTLP_HTTP_PORT}:4318

opencodeco-jaeger:
container_name: opencodeco-jaeger
image: jaegertracing/all-in-one:1.54
image: jaegertracing/all-in-one:1.76.0
ports:
- ${JAEGER_UI_PORT}:16686

opencodeco-prometheus:
container_name: opencodeco-prometheus
image: prom/prometheus:v2.46.0
image: prom/prometheus:v3.3.0
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- ${PROMETHEUS_PORT}:9090

opencodeco-grafana:
container_name: opencodeco-grafana
image: grafana/grafana:10.0.3
image: grafana/grafana:11.6.0
ports:
- ${GRAFANA_PORT}:3000
volumes:
Expand Down
6 changes: 1 addition & 5 deletions o11y/otelcol-config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
receivers:
jaeger:
protocols:
thrift_http:
thrift_binary:
statsd:
endpoint: 0.0.0.0:8125
is_monotonic_counter: true
Expand All @@ -27,7 +23,7 @@ service:
level: "debug"
pipelines:
traces:
receivers: [otlp, jaeger]
receivers: [otlp]
exporters: [debug, otlp/jaeger]
metrics:
receivers: [otlp, statsd]
Expand Down
13 changes: 9 additions & 4 deletions postgres/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
version: '3'
services:
opencodeco-postgres:
container_name: opencodeco-postgres
image: postgres:latest
image: postgres:17.4
restart: always
ports:
- ${POSTGRES_PORT}:5432
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- opencodeco-postgres:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

opencodeco-pgadmin:
container_name: opencodeco-pgadmin
image: dpage/pgadmin4:latest
image: dpage/pgadmin4:9.2
ports:
- ${PGADMIN_PORT}:80
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD}
depends_on:
- opencodeco-postgres
opencodeco-postgres:
condition: service_healthy

networks:
default:
Expand Down
7 changes: 6 additions & 1 deletion rabbitmq/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
opencodeco-rabbitmq:
container_name: opencodeco-rabbitmq
image: rabbitmq:3-management-alpine
image: rabbitmq:4.1-management-alpine
ports:
- ${RABBITMQ_PORT}:5672
- ${RABBITMQ_UI_PORT}:15672
Expand All @@ -10,6 +10,11 @@ services:
RABBITMQ_DEFAULT_PASS: opencodeco
volumes:
- opencodeco-rabbitmq:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5

networks:
default:
Expand Down
11 changes: 8 additions & 3 deletions redis/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
services:
opencodeco-redis:
container_name: opencodeco-redis
image: redis:7.0
image: redis:7.4
ports:
- ${REDIS_PORT}:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5

opencodeco-redisinsight:
container_name: opencodeco-redisinsight
image: redislabs/redisinsight:1.14.0
image: redis/redisinsight:3.2.0
ports:
- ${REDISINSIGHT_PORT}:8001
- ${REDISINSIGHT_PORT}:5540

networks:
default:
Expand Down
8 changes: 4 additions & 4 deletions stack
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ else
fi

CONTAINER_COMPOSE=
if command -v docker-compose > /dev/null 2>&1; then
if docker compose --help > /dev/null 2>&1; then
CONTAINER_COMPOSE="docker compose"
elif command -v docker-compose > /dev/null 2>&1; then
CONTAINER_COMPOSE=docker-compose
elif command -v podman-compose > /dev/null 2>&1; then
CONTAINER_COMPOSE=podman-compose
elif docker compose --help > /dev/null 2>&1; then
CONTAINER_COMPOSE="docker compose"
else
echo "Could not find \"docker-compose\", \"podman-compose\" or \"docker compose\", aborting"
echo "Could not find \"docker compose\", \"docker-compose\" or \"podman-compose\", aborting"
exit 1
fi

Expand Down
Loading
Loading