Skip to content

JackW6809/jqplay

 
 

Repository files navigation

Alt text

jqplay is a playground for jq.

Table of Contents

Development

Dependencies

To develop jqplay you must have the following tools:
Go development environment
Node.js
yarn

PostgreSQL

You must have a PostgreSQL database running.

MySQL

You must have a MySQL or MariaDB database running.

Makefile

Running make build will build the jqplay binary and the frontend assets.

Deployment - PostgreSQL

Environment Variables

The following environment variables are required to run jqplay:
DATABASE_URL - The database URL to connect to, in the format postgres://user:pass@host:port/database.
DATABASE_DRIVER - The database driver to use, this must be set to postgres.

Docker-Compose

You are able to make use of the docker-compose-postgres.yml file to deploy jqplay with a database meaning little setup is required with the following command:

docker-compose -f docker-compose-postgres.yml up -d

It is recommended that you change the database credentials in the docker-compose-postgres.yml file to something more secure.

Docker

If you already have a postgreSQL database running, you can make use of my public Docker image to deploy jqplay with the following command, replacing the DATABASE_URL environment variable with your database credentials:

docker run -d -p 8080:8080 -e DATABASE_URL="postgres://jqplay-user:jqplay-pass@postegresql-host/jqplay-db?sslmode=disable" DATABASE_DRIVER="postgres" registry.jackoxi.systems/public-images/jq-play-server:latest

Dockerfile

If you have a postgreSQL running, you can make use of the Dockerfile to deploy jqplay with the following command, replacing the DATABASE_URL environment variable with your database credentials:

docker build -t jqplay --build-arg DATABASE_URL="postgres://jqplay-user:jqplay-pass@postegresql-host/jqplay-db?sslmode=disable" DATABASE_DRIVER="postgres".
docker run -d -p 8080:8080 jqplay

Binary

If you have a postgreSQL database running, you can make use of the jqplay binary to deploy jqplay with the following command, replacing the DATABASE_URL environment variable with your database credentials:

DATABASE_URL="postgres://jqplay-user:jqplay-pass@postegresql-host/jqplay-db?sslmode=disable" DATABASE_DRIVER="postgres"./jqplay

Deployment - MySQL

Environment Variables

The following environment variables are required to run jqplay:
DATABASE_URL - The database URL to connect to, in the format user:pass@tcp(host:port)/database.
DATABASE_DRIVER - The database driver to use, this must be set to mysql.

Docker-Compose

You are able to make use of the docker-compose-mysql.yml file to deploy jqplay with a database meaning little setup is required with the following command:

docker-compose -f docker-compose-mysql.yml up -d

It is recommended that you change the database credentials in the docker-compose-mysql.yml file to something more secure.

Docker

If you already have a MySQL database running, you can make use of my public Docker image to deploy jqplay with the following command, replacing the DATABASE_URL environment variable with your database credentials:

docker run -d -p 8080:8080 -e DATABASE_URL="jqplay_user:jqplay_pass@tcp(db:3306)/jqplay_db" registry.jackoxi.systems/public-images/jq-play-server:latest

Dockerfile

If you have a MySQL running, you can make use of the Dockerfile to deploy jqplay with the following command, replacing the DATABASE_URL environment variable with your database credentials:

docker build -t jqplay --build-arg DATABASE_URL="jqplay_user:jqplay_pass@tcp(db:3306)/jqplay_db" .
docker run -d -p 8080:8080 jqplay

Binary

If you have a MySQL database running, you can make use of the jqplay binary to deploy jqplay with the following command, replacing the DATABASE_URL environment variable with your database credentials:

DATABASE_URL="jqplay_user:jqplay_pass@tcp(db:3306)/jqplay_db" DATABASE_DRIVER="mysql" ./jqplay

License

jqplay is released under the MIT license. See LICENSE.md.

About

A playground for jq, written in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 57.0%
  • JavaScript 28.8%
  • CSS 6.9%
  • Dockerfile 4.9%
  • Makefile 2.4%