openshiporg / openship

multi-channel fulfillment at scale
https://openship.org
GNU Affero General Public License v3.0
1.04k stars 75 forks source link

Suggestion: Utilising Docker #8

Closed TheRealFlyingCoder closed 1 year ago

TheRealFlyingCoder commented 1 year ago

This project could benefit from utilising Docker.

At least for local development a docker-compose.yml would make setting up postgress simple:

version: '3.8'
services:
    database:
        image: 'postgres:14.1-alpine'
        environment:
            - POSTGRES_USER=postgres
            - POSTGRES_PASSWORD=postgres
            - POSTGRES_DB=openship
        expose:
            - '5435'
        ports:
            - '5435:5432'
        volumes:
            - './.cache/db/data:/var/lib/postgresql/data'
            - './.cachec/db/init:/docker-entrypoint-initdb.d'

Running / Deploying keystone via docker is also pretty simple, but there are a heap of ways you can do it so I won't drop all the code here.

Thoughts?

junaid33 commented 1 year ago

I tried to create a docker compose file, but it wouldn't work for some reason. It may be because Openship uses Next.js and the withKeystone function in the next.config.js. If you can get one working for Openship, I'd gladly accept a PR.