Skip to content
Draft
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
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ setup:
@docker compose build
@docker compose up -d

# Open the pgAdmin interface in the default browser
pgadmin:
@echo "Opening pgAdmin interface at http://localhost:5050"
@open http://localhost:5050

# Rebuild and start the containers (force rebuild)
rebuild:
@docker compose build --no-cache
Expand Down Expand Up @@ -37,6 +42,20 @@ load-db:
verify-db:
@docker compose exec pgduckdb psql -U postgres -d postgres -c "SELECT COUNT(*) FROM raw_claims;"

<<<<<<< Updated upstream
=======
# Information about connecting to PostgreSQL via pgAdmin
pgadmin-info:
@echo "To connect to PostgreSQL in pgAdmin:"
@echo " 1. Open http://localhost:5050 in your browser"
@echo " 2. Login with [email protected] / admin"
@echo " 3. Add a new server with these settings:"
@echo " - Name: pgduckdb"
@echo " - Host: pgduckdb"
@echo " - Port: 5432"
@echo " - Username: postgres"
@echo " - Password: postgres"
>>>>>>> Stashed changes

# Check the running containers
status:
Expand Down
51 changes: 41 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
services:

# Base containers
linuxbase:
build: ./linuxbase
container_name: linuxbase
image: linuxbase

# Application containers (extending base containers)
pythonbase:
build:
context: ./pythonbase
build: ./pythonbase
container_name: pythonbase
image: pythonbase
depends_on:
linuxbase:
condition: service_completed_successfully
- linuxbase
ports:
- "4213:4213"

linuxbase:
build:
context: ./linuxbase
container_name: linuxbase
image: linuxbase

# Database containers
pgduckdb:
image: pgduckdb/pgduckdb:17-v0.1.0
container_name: pgduckdb
Expand All @@ -32,7 +32,26 @@ services:
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
retries: 5
networks:
- sonnet_network

pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "5050:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- pgduckdb
networks:
- sonnet_network

# Storage containers
minio:
image: minio/minio:latest
container_name: minio
Expand All @@ -44,9 +63,21 @@ services:
- 9001:9001
- 9000:9000
command: ["server", "/data", "--console-address", ":9001"]
volumes:
- minio_data:/data
networks:
- sonnet_network

volumes:
pgduckdb_data:
driver: local
pgadmin_data:
driver: local
minio_data:
driver: local
data:
driver: local

networks:
sonnet_network:
driver: bridge
20 changes: 9 additions & 11 deletions linuxbase/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM ubuntu:24.04 AS builder
FROM --platform=$BUILDPLATFORM alpine:3.18 AS builder

# Set build arguments for cross-compilation
ARG TARGETPLATFORM
Expand All @@ -10,16 +10,14 @@ RUN echo "Sonnet Scripts running on $BUILDPLATFORM, building for $TARGETPLATFORM
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
TZ="America/Chicago" \
DEBIAN_FRONTEND=noninteractive

# Update and install required packages for common build dependencies
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
locales git curl wget vim bash unzip \
gcc build-essential openssl ca-certificates && \
locale-gen en_US.UTF-8 && \
rm -rf /var/lib/apt/lists/*
TZ="America/Chicago"

# Install minimal build dependencies
RUN apk add --no-cache \
ca-certificates openssl \
git curl wget bash unzip \
build-base libc6-compat gcc musl-dev && \
rm -rf /var/lib/apk/lists/*

# (Placeholder) Insert cross-compilation-specific build commands here
# RUN if [ "$TARGETARCH" = "arm64" ]; then \
Expand Down