This PR enhances the Docker build and deployment process for the Arcade Worker by: - **Modularizing Docker Builds:** - Introduces a new `INSTALL_TOOLKITS` build argument in the `Dockerfile` to conditionally include toolkits. this enables the creation of a `arcadeai/worker-base` which can be used to build custom containers in a multi-stage build. an example of this is included in the example dir. - Adds `docker-base` Makefile target to build a lightweight base image without toolkits. - **Publishing to GitHub Container Registry (GHCR):** - Adds Makefile targets `publish-ghcr` and `gh-login` for pushing images to GHCR. - Supports publishing both base and full images with toolkits to GHCR. - **Docker Compose:** - Add Docker compose file and setup - Renames the `actor` service to `worker` - Adds an `nginx` service in `docker-compose.yml` to proxy requests to the Arcade Engine. - Introduces an `nginx.conf` file for the Nginx service. - **Streamlining Toolkit Installation:** - Moves toolkit installation from the `start.sh` script to the Docker build process. - Creates a `toolkits.txt` file to manage toolkit dependencies which can be edited easily when we want to add a new toolkit. Developers can also use this approach as shown in the example. - **Improving Configuration Files:** - Updates `docker.engine.yaml` and `env.example` to align with the new setup. TODO: - CI/CD needs to be adjusted so that images are pushed to ghcr on release. - AWS resources need to be renamed actor -> worker @EricGustin This can go in after the above two items are resolved. --------- Co-authored-by: Wils Dawson <wils@arcade-ai.com> Co-authored-by: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Co-authored-by: sdreyer <sterling@arcade-ai.com> Co-authored-by: Sterling Dreyer <sdreyer21@gmail.com> Co-authored-by: Nate Barbettini <nathanaelb@gmail.com>
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
engine:
|
|
image: ghcr.io/arcadeai/engine:latest
|
|
container_name: arcade-engine
|
|
volumes:
|
|
- ./docker.engine.yaml:/bin/engine.yaml
|
|
- ./.env:/bin/.env
|
|
- ./arcade-engine.sqlite3:/app/arcade-engine.sqlite3
|
|
ports:
|
|
- "9099:9099"
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
worker:
|
|
condition: service_started
|
|
networks:
|
|
arcade-network:
|
|
command: /bin/arcade-engine --config /bin/engine.yaml --env /bin/.env --migrate
|
|
|
|
worker:
|
|
# image: ghcr.io/arcadeai/arcade-ai:latest
|
|
image: arcade-worker:0.1.0
|
|
container_name: arcade-worker
|
|
ports:
|
|
- "8002:8002"
|
|
networks:
|
|
arcade-network:
|
|
|
|
redis:
|
|
image: redis/redis-stack:latest
|
|
container_name: arcade-redis
|
|
ports:
|
|
- "6379:6379"
|
|
- "8004:8002"
|
|
depends_on:
|
|
worker:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "ping" ]
|
|
interval: 3s
|
|
timeout: 3s
|
|
retries: 5
|
|
networks:
|
|
arcade-network:
|
|
|
|
nginx:
|
|
image: nginx:stable-alpine
|
|
container_name: arcade-nginx
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
depends_on:
|
|
- engine
|
|
networks:
|
|
- arcade-network
|
|
|
|
networks:
|
|
arcade-network:
|
|
driver: bridge
|