Overview

This guide provides instructions on deploying an Oxla Docker container using an AWS S3 bucket as object storage. The setup involves configuring Docker, creating a Docker cCompose file and running the Oxla container with S3 integration.

Prerequisites

Before proceeding, make sure you have the following:

  • Docker: install Docker on your machine
  • PostgreSQL Client: install PostgreSQL client to connect to the Oxla database
  • AWS S3 Bucket: create an AWS S3 bucket to store you data
  • AWS Credentials: obtain your AWS access key ID and secret access key

Docker Compose File

Open your terminal and create a new Docker Compose file named docker-compose.s3-credentials.yml:

vim docker-compose.s3-credentials.yml

Input the following configuration into the file and replace the placeholder values below with the actual credentials and region settings from your AWS instance to enable proper access to S3 resources:

version: '3.5'
volumes:
  oxla_data:
services:
  oxla_node_1:
    image: public.ecr.aws/oxla/release
    security_opt:
      - seccomp:unconfined
    ulimits:
      nofile:
        soft: 40000
        hard: 40000
    ports:
      - 5432:5432
    environment:
      - LOGGING__LEVEL=verbose
      - OXLA_HOME=s3://{your-bucket-name/your-empty-directory-name}
      - AWS_DEFAULT_REGION={your-region}
      - AWS_ACCESS_KEY_ID={your-access-key-id}
      - AWS_SECRET_ACCESS_KEY={your-secret-access-key}
Make sure that oxla_home variable references a directory in your S3 bucket that is either empty or exclusively contains files conforming to the Oxla format.

Save and exit the file by typing :wq and pressing Enter.

Running Docker Container

After saving the YAML file, run the following command to create and start the Oxla docker container:

docker compose -f docker-compose.s3-credentials.yml up

This command will start the Oxla service and connects it to your specified S3 bucket using the provided credentials. You can now verify that Oxla is running correctly by using the PostgreSQL client:

psql -h localhost -U oxla oxla

Upon successful execution, you should see a similar output:

psql (17.2 (Ubuntu 17.2-1.pgdg22.04+1), server 16.0 (oxla version: 1.63.0)

oxla=>

For more information on Oxla’s Environment Variables check out the Configuration file section.