Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compose.sh to handle linux/osx/windows differences with podman. #1933

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,28 @@ 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'
Loading