robtec / vendure-docker

Docker container for developing on Vendure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vendure Docker

Docker container for developing on Vendure

Setup

clone Vendure to the same directory as this repo

git clone https://github.com/vendure-ecommerce/vendure.git

You should now hava a vendure directory, that will be mounted into your container

DB

Update vendure/packages/dev-server/dev-config.ts to the following db settings from our postgres in the docker-compose.yml file

...
function getDbConfig(): ConnectionOptions {
    const dbType = process.env.DB || 'mysql';
    switch (dbType) {
        case 'postgres':
            console.log('Using postgres connection');
            return {
                synchronize: true,
                type: 'postgres',
                host: 'database',
                port: 5432,
                username: 'pguser',
                password: 'mysecretpassword',
                database: 'vendure',
            };
...

Run

Build the image and run the container (this will mount vendure into the container as a volume)

docker compose up -d --build

Follow the logs to see the build status (can take 6 to 10 minutes to complete)

docker logs -f vendure

Once you see ### Build Complete ###, navigate to http://<ip-address>:3000/admin

Docs

About

Docker container for developing on Vendure


Languages

Language:Shell 79.2%Language:Dockerfile 20.8%