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

Rootless podman support #628

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions commands/env.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ if [[ -f "${WARDEN_HOME_DIR}/.env" ]]; then
fi
export WARDEN_IMAGE_REPOSITORY="${WARDEN_IMAGE_REPOSITORY:-"docker.io/wardenenv"}"

export WARDEN_DOCKER_USERNS_MODE="${WARDEN_DOCKER_USERNS_MODE:-host}"

## configure environment type defaults
if [[ ${WARDEN_ENV_TYPE} =~ ^magento ]]; then
export WARDEN_SVC_PHP_VARIANT=-${WARDEN_ENV_TYPE}
Expand Down
4 changes: 4 additions & 0 deletions commands/svc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ if [[ -f "${WARDEN_HOME_DIR}/.env" ]]; then
eval "$(grep "^WARDEN_DNSMASQ_ENABLE" "${WARDEN_HOME_DIR}/.env")"
# Check Portainer
eval "$(grep "^WARDEN_PORTAINER_ENABLE" "${WARDEN_HOME_DIR}/.env")"
# Check Docker socket
eval "$(grep "^WARDEN_DOCKER_SOCK" "${WARDEN_HOME_DIR}/.env")"
fi

export WARDEN_DOCKER_SOCK="${WARDEN_DOCKER_SOCK:-/var/run/docker.sock}"

## add dnsmasq docker-compose
WARDEN_DNSMASQ_ENABLE="${WARDEN_DNSMASQ_ENABLE:-1}"
if [[ "$WARDEN_DNSMASQ_ENABLE" == "1" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.portainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ services:
container_name: portainer
image: portainer/portainer-ce
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${WARDEN_DOCKER_SOCK}:/var/run/docker.sock
- portainer:/data
labels:
- traefik.enable=true
- traefik.http.routers.portainer.tls=true
- traefik.http.routers.portainer.rule=Host(`portainer.${WARDEN_SERVICE_DOMAIN:-den.test}`)||Host(`portainer.warden.test`)
- traefik.http.services.portainer.loadbalancer.server.port=9000
restart: ${WARDEN_RESTART_POLICY:-always}
restart: ${WARDEN_RESTART_POLICY:-always}
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- ${WARDEN_HOME_DIR}/etc/traefik/traefik.yml:/etc/traefik/traefik.yml
- ${WARDEN_HOME_DIR}/etc/traefik/dynamic.yml:/etc/traefik/dynamic.yml
- ${WARDEN_HOME_DIR}/ssl/certs:/etc/ssl/certs
- /var/run/docker.sock:/var/run/docker.sock
- ${WARDEN_DOCKER_SOCK}:/var/run/docker.sock
labels:
- traefik.enable=true
- traefik.http.routers.traefik.tls=true
Expand Down
2 changes: 2 additions & 0 deletions environments/includes/php-fpm.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
- CHOWN_DIR_LIST=${CHOWN_DIR_LIST:-}
volumes: *volumes
extra_hosts: *extra_hosts
userns_mode: ${WARDEN_DOCKER_USERNS_MODE:-host}

php-debug:
hostname: "${WARDEN_ENV_NAME}-php-debug"
Expand All @@ -46,6 +47,7 @@ services:
- CHOWN_DIR_LIST=${CHOWN_DIR_LIST:-}
volumes: *volumes
extra_hosts: *extra_hosts
userns_mode: ${WARDEN_DOCKER_USERNS_MODE:-host}
depends_on:
- php-fpm
volumes:
Expand Down