Skip to content

Commit

Permalink
Merge pull request #350 from montehurd/more-stability-fixes
Browse files Browse the repository at this point in the history
More stability fixes
  • Loading branch information
montehurd committed Jun 27, 2024
2 parents 35519b7 + 9e9bcfe commit e0717e2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PIXEL_MW_SCRIPT_PATH=/w
PIXEL_MW_DOCKER_PORT=3000
PIXEL_MW_SERVER="http://localhost:${PIXEL_MW_DOCKER_PORT}"
PIXEL_MW_DOCKER_PORT=8080
PIXEL_MW_SERVER="http://mediawiki-web:${PIXEL_MW_DOCKER_PORT}"
4 changes: 2 additions & 2 deletions clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# will reset everything so that Pixel starts with a clean slate.

# Stop and remove Docker containers, networks, and volumes
docker compose --progress=plain --project-directory . -f ./docker-compose.yml down --rmi all --volumes --remove-orphans
docker compose --progress=plain --project-directory . -f ./docker-compose.yml down --rmi all --volumes --remove-orphans 2>&1

# Remove other images and intermediate build artifacts
docker system prune -af
docker system prune -af 2>&1
5 changes: 2 additions & 3 deletions config/configCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ module.exports = {
asyncCompareLimit: 25,
engine: 'puppeteer',
engineOptions: {
headless: 'new',
headless: true,
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--single-process',
'--disable-dev-shm-usage',
'--disable-gpu',
'--disable-gpu-sandbox'
]
},
debug: true,
debug: false,
debugWindow: false,
delay: 100
};
17 changes: 15 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
networks:
pixel_network:

volumes:
dbdata:
mwcode:
Expand Down Expand Up @@ -25,6 +28,8 @@ services:
depends_on:
database:
condition: service_healthy
networks:
- pixel_network
mediawiki-web:
image: docker-registry.wikimedia.org/dev/buster-apache2:2.0.0-s1
ports:
Expand All @@ -40,6 +45,8 @@ services:
depends_on:
database:
condition: service_healthy
networks:
- pixel_network
database:
build:
context: .
Expand All @@ -54,9 +61,10 @@ services:
interval: 1s
timeout: 5s
retries: 20
networks:
- pixel_network
visual-regression:
init: true
network_mode: host
build:
context: .
dockerfile: Dockerfile.visual-regression
Expand All @@ -75,9 +83,10 @@ services:
shm_size: 2gb
cap_add:
- SYS_ADMIN
networks:
- pixel_network
a11y-regression:
init: true
network_mode: host
build:
context: .
dockerfile: Dockerfile.a11y-regression
Expand All @@ -96,6 +105,8 @@ services:
shm_size: 2gb
cap_add:
- SYS_ADMIN
networks:
- pixel_network
png-optimizer:
build:
context: .
Expand All @@ -104,3 +115,5 @@ services:
- ./report:/pixel/report
- ./png-optimizer.sh:/opt/scripts/png-optimizer.sh
working_dir: /pixel/report
networks:
- pixel_network
8 changes: 4 additions & 4 deletions rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
set -e

# Stop and remove Docker containers, networks, and volumes
./clean.sh
./clean.sh 2>&1

# Build the pixel-base-regression image
./build-base-regression-image.sh
./build-base-regression-image.sh 2>&1

# Build or rebuild services
docker compose --progress=plain --project-directory . -f ./docker-compose.yml build
docker compose --progress=plain --project-directory . -f ./docker-compose.yml build 2>&1

# Remove any dangling images
docker image prune -f
docker image prune -f 2>&1

0 comments on commit e0717e2

Please sign in to comment.