Skip to content

Commit

Permalink
Add compose.sh to handle linux/osx/windows differences with podman.
Browse files Browse the repository at this point in the history
can hopefully be removed once containers/podman#19852
better handled.
  • Loading branch information
maxandersen committed Apr 5, 2024
1 parent 43451aa commit 043f36b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,29 @@ These instructions will get you a copy of the Quarkus.io website up and running

### Installation

#### Using Docker
#### Using Docker or Podman

1. Install [Docker Desktop](https://docs.docker.com/install/).
1. Install [Docker Desktop](https://docs.docker.com/install/) or [Podman Desktop](https://podman-desktop.io/downloads/).
2. Fork the [project repository](https://github.com/quarkusio/quarkusio.github.io), then clone your fork.

git clone git@github.com:YOUR_USER_NAME/quarkusio.github.io.git

3. Change into the project directory:

cd quarkusio.github.io
4. Run Docker Composer

docker-compose up
4. Run Docker Compose using `compose.sh`

compose.sh

5. *OR* run docker compose manually setting _SELINUX_ to "Z:" or "" dependent on OS:

_SELINUX_=Z: docker compose up # Linux

_SELINUX_= docker compose up # Mac or Windows

5. Now browse to http://localhost:4000

#### Using a local Ruby environment
[Jekyll static site generator docs](https://jekyllrb.com/docs/).

Expand Down
3 changes: 3 additions & 0 deletions compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export _SELINUX_=$(if [[ "$(uname)" == "Linux" ]]; then echo ":Z"; else echo ""; fi)
echo '$_SELINUX_'
docker-compose up $*
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ services:
# Also, enable dev config
command: [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000", "--incremental", "--config", "_config.yml,_config_dev.yml" ]
volumes:
- .:/site:Z
## this Z handling needed to make things
## work on podman (see https://github.com/containers/podman/issues/19852)
- .:/site #${_SELINUX_?_SELINUX_ variable is required and must be set to ':Z' if SELinux context is needed for volumes or run compose.sh to do it for you.}
ports:
- '4000:4000'

0 comments on commit 043f36b

Please sign in to comment.