The Wayback Machine - https://web.archive.org/web/20231230001945/https://github.com/openshiporg/openship
Skip to content

openshiporg/openship

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
December 13, 2023 10:27
December 7, 2023 04:04
December 13, 2023 10:54
March 2, 2023 01:08
December 26, 2023 19:01
March 2, 2023 01:08
March 2, 2023 01:08
December 26, 2023 19:01
svg
December 7, 2023 04:04
March 2, 2023 01:08
March 2, 2023 01:08
March 2, 2023 01:08
March 2, 2023 01:08
March 2, 2023 01:08
March 2, 2023 01:08
November 28, 2023 13:40
December 7, 2023 04:04
September 2, 2023 13:41
March 2, 2023 01:08
December 7, 2023 04:04
December 7, 2023 04:04
March 2, 2023 01:08
September 2, 2023 13:23
September 2, 2023 13:23
December 26, 2023 19:11

Openship is an operations platform that enables multi-channel fulfillment

Website · Documentation · Openship Cloud

Running locally

To get Openship running on your local machine:

Clone the repo

git clone https://github.com/openshiporg/openship

Rename example.env to .env

//.env
FRONTEND_URL=http://localhost:3000
DATABASE_URL=postgresql://postgres:example@url:3000/postgres
SESSION_SECRET=please_change_me

Be sure to replace DATABASE_URL with a postgres connection string.

You can run postgres locally or get a database online.

Railway offers a free, temporary postgres database.

Start the application

Run the following commands start up Openship:

$ cd openship
$ yarn install
$ yarn dev

Openship: http://localhost:3000

Once the application is running, go to localhost:3000. If there are no users in the database, you'll be redirected to localhost:3000/init where you can create the admin user.

GraphQL Playground: http://localhost:3000/api/graphql

Use the playground to build and run queries/mutations against the API.

Keystone CMS: http://localhost:3000/dashboard

Openship uses Keystone.js. Openship mounts the Keystone Admin UI to /dashboard. It's a great way to see and interact with your database.

Deployment

Openship uses Next.js, so naturally, it can be hosted anywhere that supports Node.js. Openship also requires a postgres database.

1-Click Deployment

These deployment services offer Node.js and postgres databases so Openship can be deployed in 1-click.

Railway

Deploy on Railway

Render

Deploy to Render

Next.js Deployment

To deploy on platforms that don't support databases like Netlify and Vercel, you'll need to pass a postgres connection string as the DATABASE_URL variable.

Vercel

Deploy with Vercel

Netlify

Deploy to Netlify

Go to site settings > build & deploy > environment and add these variables:

  FRONTEND_URL=http://localhost:3000
  DATABASE_URL=postgresql://postgres:example@url:3000/postgres
  SESSION_SECRET=OH_PLEASE_PLEASE_CHANGE_ME

Replace DATABASE_URL with a postgres database connection string and FRONTEND_URL with the url ending in netlify.app. Redeploy the site.

Docker

Create a copy of example.env named .env and cusotmize the session secret, as well as the postgres user/password/dbname as you wish:

cp example.env .env

The project datase init is coupled with the build system, so we have to start the postgres service before building:

mkdir ./volumes/postgres/data
docker-compose up -d postgres

Now build and start the OpenShip container itself:

docker-compose up -d

The web app should be available at curl localhost:3100. If it is not, please check docker-compose logs.

Finally, expose the localhost:3100 to the desired public host.

Credits

Openship wouldn't be here without these great projects