I have been experimenting with Sitecore Docker and Sitecore JSS and finally was able to get a perfect setup for me to get going fast with Sitecore JSS.

Here is the repo https://github.com/tmamedbekov/playing-with-docker/tree/master/sitecore-jss

Step 1 Clone the official Repo

git clone https://github.com/Sitecore/docker-images

Step 2 You will build the Images

.\Build.ps1 -IncludeJSS

Now lets verify that you have all the necessary images

docker image ls | Select-String "jss"

Step 3 You will build docker containers from the template files

## Build your container
docker-compose -f .\docker-compose.xp.jss.yml up -d

## Tear it down
docker-compose -f .\docker-compose.xp.jss.yml down

and then you will be able to launch http://localhost:44001 and you should have everything running.

How I modified it, and made it a little custom and you are welcome to just close my repo and start from there.

One thing that I like to have all the HTTPS set up locally so I don’t have any warnings in the browser.

So this is what I have prepared in the repo:

https://github.com/tmamedbekov/playing-with-docker/tree/master/sitecore-jss

If you run the certs and install them (it is included in the repo in folder /setup/), and then make a change that is listed in the docker file, see below the snippet, for the full docker compose file see the repo, you can modify and make alias to whatever you want. But if you start it from my repo, it will have a domain alias https://jss.dev.local/.

ports:
      - "44001:80"
      - "44002:443"
networks:
      default:
        aliases:
          - jss.dev.local

Next thing is that we need to get GraphQL working, so I have added the necessary files in the repo as well, so you just need to copy them as well into your working directory, unless you will be using my repo to do all the work.

File is located in:

https://github.com/tmamedbekov/playing-with-docker/blob/master/sitecore-jss/deploy/website/App_Config/Include/graphql.config

Once you are past this step, you should be able to access the following URLs

http://localhost:44001/sitecore/api/graph/items/master

http://localhost:44001/sitecore/api/graph/items/master/ui

If you are having problems, go ahead and clone my repo build the images and then build your container.

https://github.com/tmamedbekov/playing-with-docker/tree/master/sitecore-jss

Point your deployment to the following folder /deploy/website.

This completes the basic setup with SitecoreJSS and Sitecore on Docker.

If you have questions, do not hesitate to reach out.

Repo with the code:

https://github.com/tmamedbekov/playing-with-docker/tree/master/sitecore-jss

Resource:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s