-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add automatic Docker and Docker Compose installation to setup s… #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request modernizes Docker usage by transitioning from the deprecated docker-compose command to the newer docker compose syntax and adds automated installation capabilities for Docker, Docker Compose, and Git. The changes also streamline the CI workflow by removing pull request triggers.
- Replaces all
docker-composecommands withdocker composethroughout the setup script - Adds automated installation functions with user prompts for Docker, Docker Compose, and Git
- Removes pull request triggers from the CI workflow to limit execution to main branch pushes
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| setup.sh | Updated to use modern Docker Compose syntax and added automated installation functions for dependencies |
| .github/workflows/ci.yml | Removed pull request triggers to limit CI execution to main branch pushes only |
|
|
||
| # Start production services with HTTPS by default | ||
| docker-compose -f docker-compose.prod.yml up -d | ||
| docker compose -f docker compose.prod.yml up -d |
Copilot
AI
Jul 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid syntax: the command should be 'docker compose -f docker-compose.prod.yml up -d' with hyphens in the filename, not 'docker compose -f docker compose.prod.yml'.
| docker compose -f docker compose.prod.yml up -d | |
| docker compose -f docker-compose.prod.yml up -d |
| docker compose -f docker compose.yml -f docker compose.genai.yml --profile setup run --rm model-downloader | ||
|
|
||
| print_info "Starting GenAI services..." | ||
| docker-compose -f docker-compose.yml -f docker-compose.genai.yml up -d | ||
| docker compose -f docker compose.yml -f docker compose.genai.yml up -d |
Copilot
AI
Jul 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid syntax: the filenames should use hyphens, not spaces. Should be 'docker compose -f docker-compose.yml -f docker-compose.genai.yml --profile setup run --rm model-downloader'.
| docker compose -f docker compose.yml -f docker compose.genai.yml --profile setup run --rm model-downloader | ||
|
|
||
| print_info "Starting GenAI services..." | ||
| docker-compose -f docker-compose.yml -f docker-compose.genai.yml up -d | ||
| docker compose -f docker compose.yml -f docker compose.genai.yml up -d |
Copilot
AI
Jul 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid syntax: the filenames should use hyphens, not spaces. Should be 'docker compose -f docker-compose.yml -f docker-compose.genai.yml up -d'.
| print_info "Restarting services with Let's Encrypt..." | ||
| docker-compose -f docker-compose.yml -f docker-compose.genai.yml down | ||
| docker-compose -f docker-compose.prod.yml --profile genai up -d | ||
| docker compose -f docker compose.yml -f docker compose.genai.yml down |
Copilot
AI
Jul 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid syntax: the filenames should use hyphens, not spaces. Should be 'docker compose -f docker-compose.yml -f docker-compose.genai.yml down'.
| docker compose -f docker compose.yml -f docker compose.genai.yml down | |
| docker compose -f docker-compose.yml -f docker-compose.genai.yml down |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | ||
|
|
Copilot
AI
Jul 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downloading and executing content from the internet without verification poses a security risk. Consider adding checksum verification or using package manager alternatives when available.
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| print_info "Downloading Docker's GPG key..." | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /tmp/docker.gpg | |
| print_info "Verifying Docker's GPG key fingerprint..." | |
| EXPECTED_FINGERPRINT="9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88" | |
| DOWNLOADED_FINGERPRINT=$(gpg --with-fingerprint /tmp/docker.gpg | grep -A1 "pub" | tail -n1 | awk '{print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}') | |
| if [ "$DOWNLOADED_FINGERPRINT" != "$EXPECTED_FINGERPRINT" ]; then | |
| print_error "Docker's GPG key fingerprint verification failed!" | |
| exit 1 | |
| fi | |
| print_success "Docker's GPG key fingerprint verified successfully!" | |
| sudo mkdir -m 0755 -p /etc/apt/keyrings | |
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg /tmp/docker.gpg | |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces several changes to streamline Docker usage in the
setup.shscript and updates the CI workflow configuration. The most significant updates include replacingdocker-composecommands withdocker composeto align with newer Docker standards, adding an automated Docker installation process, and removing pull request triggers from the CI workflow.Docker-related improvements:
docker compose: Replaced all instances ofdocker-composewithdocker composeacross various commands insetup.shto adopt the latest Docker CLI syntax. [1] [2] [3] [4] [5] [6] [7]CI workflow updates:
pull_requesttrigger was removed from the CI workflow configuration in.github/workflows/ci.yml, limiting the workflow topushevents on themainbranch. This simplifies the CI process.