Skip to content

Commit 1b4bbd8

Browse files
committed
Add log directory creation and permission settings in PostgreSQL startup script and Playwright workflow
- Added creation of a log directory with appropriate ownership and permissions in the PostgreSQL startup script. - Updated Playwright workflow to prepare data directories with correct permissions for PostgreSQL and logs, enhancing setup consistency.
1 parent 6ecb4e2 commit 1b4bbd8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/playwright.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ jobs:
6363
BUNDEBUG=2
6464
EOF
6565
66+
# Create and prepare data directories with proper permissions
67+
- name: Prepare data directories
68+
run: |
69+
mkdir -p .data/postgres .data/logs .data/caddy-data .data/caddy-config
70+
sudo chown -R 999:999 .data/postgres .data/logs # postgres user is typically uid 999
71+
sudo chmod -R 755 .data/logs
72+
sudo chmod -R 700 .data/postgres
73+
ls -la .data/
74+
echo "Directory permissions set successfully"
75+
6676
# Build and start services using appropriate docker-compose file
6777
- name: Start services with docker-compose
6878
run: docker compose -f docker-compose.${{ matrix.config }}.${{ matrix.database }}.yml up -d --build

startup.bundle.postgres.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ export DB_PASS=${DB_PASS:-peekaping}
2121
# Create data directory if it doesn't exist
2222
mkdir -p /var/lib/postgresql/data
2323

24+
# Create log directory and fix permissions
25+
mkdir -p /var/log/supervisor
26+
chown -R postgres:postgres /var/log/supervisor
27+
chmod 755 /var/log/supervisor
28+
2429
# Fix ownership and permissions of PostgreSQL data directory
2530
chown -R postgres:postgres /var/lib/postgresql/data
2631
chmod 700 /var/lib/postgresql/data

0 commit comments

Comments
 (0)