Skip to content
Open
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ make console
./console server
```

# Run OpenMAXIO UI in docker:
[Docker Instructions](docker/).

# To connect OpenMaxIO UI to an existing Minio server run this command (replace 1.2.3.4:9000 to your address)

```bash
Expand Down
1 change: 1 addition & 0 deletions docker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./certs/*
46 changes: 46 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM ubuntu:noble

RUN mkdir -p /build

WORKDIR /build

RUN apt update
RUN apt install git -y
RUN apt install curl -y
RUN apt install wget -y
RUN apt-get install build-essential -y


RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
RUN . /root/.nvm/nvm.sh ; nvm install 18
RUN . /root/.nvm/nvm.sh ; nvm use 18
RUN . /root/.nvm/nvm.sh ; corepack enable
RUN . /root/.nvm/nvm.sh ; corepack prepare [email protected] --activate

RUN wget https://go.dev/dl/go1.23.5.linux-amd64.tar.gz
RUN tar -C /usr/local/ -xzf go1.23.5.linux-amd64.tar.gz
RUN export PATH=$PATH:/usr/local/go/bin




RUN git clone https://github.com/OpenMaxIO/openmaxio-object-browser

WORKDIR /build/openmaxio-object-browser/web-app/

RUN git checkout v1.7.6

RUN . /root/.nvm/nvm.sh ; yarn install
RUN . /root/.nvm/nvm.sh ; yarn build

WORKDIR /build/openmaxio-object-browser
RUN export PATH=$PATH:/usr/local/go/bin ; make console

FROM scratch
COPY --from=0 /build/openmaxio-object-browser/console /bin/console



expose 9090

CMD [ "/bin/console", "server" ]
28 changes: 28 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# OpenMaxIO in docker

### Prereqs
I assume this is being run on linux, if being run on windows you will need to generate certs diffirently

### Configuration

Set the location of minio:
docker-compose.yaml
- You need to set the "services/openmaxio/environment/CONSOLE_MINIO_SERVER" variable to your minio endpoint

Use valid certs:
- If you want to use proper certs, place the cert and key in ./certs/minio.crt and ./certs/minio.key

Set other environment variables:
- If you want to set further environment variables for minio, in docker-compose.yaml place them in "services/openmaxio/environment/"


### How to run

```

cd docker
# if using the self-signed certs, run the following line, if using proper certs, skip it
./generate_certs.sh
docker compose up -d

```
25 changes: 25 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '3.8'

services:
openmaxio:
build:
context: .
dockerfile: Dockerfile
ports:
- "9090:9090"
environment:
- CONSOLE_MINIO_SERVER=http[s]://your_minio_instance:9000
restart: unless-stopped

nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs/minio.crt:/cert.crt:ro
- ./certs/minio.key:/cert.key:ro
depends_on:
- openmaxio
restart: unless-stopped
13 changes: 13 additions & 0 deletions docker/generate_certs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

cd $SCRIPT_DIR

mkdir -p certs

openssl req -x509 -nodes -days 365 \
-newkey rsa:2048 \
-keyout certs/minio.key \
-out certs/minio.crt \
-subj "/CN=openmaxio"
28 changes: 28 additions & 0 deletions docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
events {}

http {
server {
listen 80;
return 301 https://$host$request_uri;


}

server {
listen 443 ssl;

client_max_body_size 100000M;

ssl_certificate /cert.crt;
ssl_certificate_key /cert.key;

location / {
proxy_pass http://openmaxio:9090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
}