This is the source code for the Debezium website. This is based on templates created by the JBoss Community using Awestruct and Bootstrap.
Contents of this repository are available as open source software under Apache License Version 2.0.
We use Docker to build the site. Be sure you have a recent version of the Docker Engine or Docker Machine.
Use Git to clone the Debezium website Git repository and change into that directory:
$ git clone https://github.com/debezium/debezium.io.git
$ cd debezium.io
If you plan to submit changes, fork the Git repository on GitHub and then add your fork as a remote:
$ git remote rename origin upstream
$ git remote add origin https://github.com/<you>/debezium.io.git
In a new terminal initialized with the Docker host environment, start a Docker container that automatically downloads the correct Ruby libraries, builds the static website files, and runs a local webserver:
$ docker run -it --rm -p 4242:4242 -v $(pwd):/site debezium/awestruct
This command tells Docker to start a container using the debezium/awestruct
image (downloading it if necessary) with an interactive terminal (via -it
flag) to the container so that you will see the output of the process running in the container. The --rm
flag will remove the container when it stops, while the -p 4242
flag maps the container's 4242 port to the same port on the Docker host (which is the local machine on Linux or the virtual machine if running Boot2Docker or Docker Machine on OS X and Windows). The -v $(pwd):/site
option mounts your current working directory (where the website's code is located) into the /site
directory within the container (where Awestruct expects to find it).
Leave this container running.
If you are running on Linux, you can proceed to step 4.
If you are running on Windows or OS X and are using Docker Machine or Boot2Docker to run the Docker host, then the container is running in a virtual machine. Although you can point your browser to the correct IP address, the generated site (at least in development mode) assumes a base URL of http://localhost:4242 and thus links will not work. Instead, use the following command to forward port 4242 on your local machine to the virtual machine. For Docker Machine, start a new terminal and run the following commands:
$ eval $(docker-machine env)
$ docker-machine ssh default -vnNTL *:4242:$(docker-machine ip default):4242
or, for Boot2Docker:
$ boot2docker shellinit
$ boot2docker ssh -vnNTL *:4242:$(boot2docker ip 2>/dev/null):4242
Leave this running while you access the website through your browser. Use CTRL-C to stop this port forwarding process when you're finished testing.
Point your browser to http://localhost:4242 to view the site. You may notice some delay during development, since the site is generated somewhat lazily.
Use any development tools on your local machine to edit the source files for the site. For minor modifications, Awestruct will detect the changes and will regenerate the corresponding static file(s). However, more comprehensive modifications may require you to restart the container (step 2).
If you have to change the Gemfile to use different libraries, you will need to let the container download the new versions. The simplest way to do this is to stop the container (using CTRL-C), use rm -rf bundler to remove the directory where the gem files are stored, and then restart the container. This ensures that you're always using the exact files that are specified in the Gemfile.lock file.
Use Git on your local machine to commit the changes to your site's codebase, and then publish the new version of the site.
TBD