codex-marketplace-ui/docker
Slava 11b44ce8be
Use custom Nginx config (#58)
* Add custom Nginx config (#53)

* Use custom Nginx config (#53)
2024-10-18 14:00:24 +03:00
..
Dockerfile Use custom Nginx config (#58) 2024-10-18 14:00:24 +03:00
README.md Add Docker builds (#55) 2024-10-16 14:41:26 +03:00
default.conf.template Use custom Nginx config (#58) 2024-10-18 14:00:24 +03:00

README.md

Codex Marketplace UI Docker images

Description

We are shipping Codex Marketplace UI as a Docker image as well.

Dockerfile is using multi-stage build and we use alpine image to speed up the build and to minimize the final Docker image size we are using a lightweight Nginx image.

Build locally

We can build image locally in the following way

  1. Install Docker

  2. Clone repository

    git clone https://github.com/codex-storage/codex-marketplace-ui
    cd codex-marketplace-ui
    
  3. Build the image

    # Variables
    VITE_CODEX_API_URL=<Default Codex API URL>
    VITE_GEO_IP_URL=<GeoIP API URL>
    
    # Build
    docker build \
      --build-arg VITE_CODEX_API_URL=${VITE_CODEX_API_URL} \
      --build-arg VITE_GEO_IP_URL=${VITE_GEO_IP_URL} \
      --no-cache \
      -f docker/Dockerfile \
      -t codex-marketplace-ui:local .
    

How to run

Base Nginx image is exposing port 80 and we can publish it to a custom local port

docker run \
  --rm \
  --name codex-marketplace-ui \
  -p 3000:80 \
  codexstorage/codex-marketplace-ui:latest

Access UI on http://localhost:3000.