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>
47 lines
1.2 KiB
Nginx Configuration File
47 lines
1.2 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes auto;
|
|
error_log /var/log/nginx/error.log;
|
|
pid /run/nginx.pid;
|
|
|
|
include /usr/share/nginx/modules/*.conf;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
client_max_body_size 5M;
|
|
client_body_buffer_size 5M;
|
|
|
|
gzip on;
|
|
gzip_comp_level 2;
|
|
gzip_types text/plain text/css text/javascript application/javascript application/xml image/jpeg image/gif image/png;
|
|
gzip_vary on;
|
|
|
|
keepalive_timeout 300;
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name arcade-engine:9099;
|
|
|
|
root /app;
|
|
client_max_body_size 10m;
|
|
|
|
location / {
|
|
proxy_pass http://arcade-engine:9099;
|
|
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_connect_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
proxy_read_timeout 300s;
|
|
}
|
|
}
|
|
}
|