This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
forked from enricoros/big-AGI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
216 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# big-AGI non-code files | ||
/docs/ | ||
/dist/ | ||
/infra/ | ||
README.md | ||
|
||
# Ignore build and log files | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build and Push to ACR | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
jobs: | ||
build: | ||
name: 'Build and Push to ACR' | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.DOCKER_REGISTRY_SERVER_URL }} | ||
username: ${{ secrets.DOCKER_REGISTRY_SERVER_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_SERVER_PASSWORD }} | ||
|
||
- uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: ${{ secrets.DOCKER_REGISTRY_SERVER_URL }}/kantega-big-agi:latest | ||
file: Dockerfile |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
# Very simple docker-compose file to run the app on http://localhost:3000 (or http://127.0.0.1:3000). | ||
# This file is used to run `big-AGI` and `browserless` with Docker Compose. | ||
# | ||
# For more examples, such runnin big-AGI alongside a web browsing service, see the `docs/docker` folder. | ||
# The two containers are linked together and `big-AGI` is configured to use `browserless` | ||
# as its Puppeteer endpoint (from the containers intranet, it is available browserless:3000). | ||
# | ||
# From your host, you can access big-AGI on http://127.0.0.1:3000 and browserless on http://127.0.0.1:9222. | ||
# | ||
# To start the containers, run: | ||
# docker-compose -f docs/docker/docker-compose-browserless.yaml up | ||
|
||
version: '3.9' | ||
|
||
services: | ||
big-agi: | ||
image: ghcr.io/enricoros/big-agi:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "3000:3000" | ||
env_file: | ||
- .env | ||
command: [ "next", "start", "-p", "3000" ] | ||
environment: | ||
- PUPPETEER_WSS_ENDPOINT=ws://browserless:3000 | ||
command: [ "next", "start", "-p", "3000" ] | ||
depends_on: | ||
- browserless | ||
|
||
browserless: | ||
image: browserless/chrome:latest | ||
ports: | ||
- "9222:3000" # Map host's port 9222 to container's port 3000 | ||
environment: | ||
- MAX_CONCURRENT_SESSIONS=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
resource "null_resource" "docker_build" { | ||
triggers = { | ||
always_run = "${timestamp()}" | ||
} | ||
|
||
provisioner "local-exec" { | ||
command = <<EOT | ||
cd "${path.module}/.." | ||
az acr login --name ${azurerm_container_registry.acr.name} | ||
if ! docker version > /dev/null 2>&1; then | ||
echo "Docker is not running. Please start Docker and try again." | ||
exit 1 | ||
fi | ||
# Create a temporary Buildx builder with docker-container driver | ||
BUILDER_NAME=temp-builder-$(date +%s) | ||
docker buildx create --name $BUILDER_NAME --use --driver docker-container | ||
docker image remove ${azurerm_container_registry.acr.login_server}/${var.project_name}:latest || true | ||
az acr repository delete --name ${azurerm_container_registry.acr.name} --image ${var.project_name}:latest --yes || true | ||
docker buildx build --platform linux/amd64,linux/arm64 -t ${azurerm_container_registry.acr.login_server}/${var.project_name}:latest --push . | ||
# Clean up the temporary builder | ||
docker buildx rm $BUILDER_NAME | ||
EOT | ||
} | ||
|
||
depends_on = [azurerm_container_registry.acr] | ||
} |
Oops, something went wrong.