Skip to content

Commit 3cc73e1

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents e39d84f + 897903c commit 3cc73e1

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/docker-publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ jobs:
6565
with:
6666
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6767
tags: |
68-
${{ github.event_name == 'pull_request' && 'type=ref,event=pr' || 'type=ref,event=branch' }}
68+
type=ref,event=branch
69+
type=ref,event=pr
70+
type=semver,pattern={{version}}
71+
type=semver,pattern={{major}}.{{minor}}
72+
type=semver,pattern={{major}}
6973
7074
# Build and push Docker image with Buildx
7175
# https://github.com/docker/build-push-action

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
FROM mcr.microsoft.com/devcontainers/php:8.3
22

33
# Change default umask and add user to web group so we can share write permission on web files
4-
RUN sed -i 's/^UMASK\s*022/UMASK 002/' /etc/login.defs
4+
# Configure pam_umask to set umask to 002 (works regardless of /etc/login.defs content)
5+
RUN sed -i 's/pam_umask\.so/pam_umask.so umask=002/' /etc/pam.d/common-session \
6+
&& sed -i 's/pam_umask\.so/pam_umask.so umask=002/' /etc/pam.d/common-session-noninteractive
57
RUN usermod -aG www-data vscode
68

79
# Add glow for formatting command usage output (and because it's just nice)
@@ -57,6 +59,9 @@ RUN sed -i 's/Listen\s*80$/# Listen 80/' /etc/apache2/ports.conf
5759
# Enable Apache modules
5860
RUN a2enmod expires headers rewrite
5961

62+
# Set umask for Apache to ensure group-writable files
63+
RUN echo "umask 002" >> /etc/apache2/envvars
64+
6065
# Install terminus
6166
RUN curl -L https://github.com/pantheon-systems/terminus/releases/latest/download/terminus.phar --output /usr/local/bin/terminus \
6267
&& chmod +x /usr/local/bin/terminus \

local/etc/uceap.d/refresh_content.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function refresh_content() {
1818
# no-same-permissions doesn't seem to work so we fix it here
1919
sudo find web/sites/default/files -type d -exec chmod g+ws {} +
2020
sudo find web/sites/default/files -type f -exec chmod g+w {} +
21+
# TODO: Temporary workaround for umask issue - remove once Dockerfile umask fix is verified
22+
chmod -R g+w web/sites/default/files
2123

2224
db-rebuild.sh $DATABASE_BACKUP
2325

0 commit comments

Comments
 (0)