Skip to content

Commit 5ce3c88

Browse files
authored
Update environment (#917)
* Update node version from 17 to 22 in Dockerfile * Decrease number of screenshot workers to 3 - we previously had a parallel test limit of 5, now testingbot gave us 4, which means we will keep our amount of screenshot runners below that to reduce conflicts in our queue. https://phabricator.wikimedia.org/T408226
2 parents 05b2231 + 3d2d260 commit 5ce3c88

File tree

4 files changed

+5
-29
lines changed

4 files changed

+5
-29
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:17-alpine
1+
FROM node:22-alpine
22

33
WORKDIR /app
44
COPY ./package.json /app/package.json

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ stop-workers:
1717
docker compose -f docker-compose.yml -f ${DOCKER_COMPOSE_OVERRIDE} down
1818

1919
# stop container environment and remove all volumes and images. This is used by our ansible deployment script
20+
# This can also be used for emptying the rabbitmq queue in production.
2021
shutdown-workers:
2122
docker compose -f docker-compose.yml -f ${DOCKER_COMPOSE_OVERRIDE} down -v --remove-orphans --rmi local
2223

@@ -28,7 +29,7 @@ build-workers:
2829
generate-dev-config:
2930
if [ ! -f docker-compose.dev.yml ]; then cp docker-compose.dev.example.yml docker-compose.dev.yml; fi
3031

31-
# Start a rabbitmq instance that workers outside the environemnt can connect to
32+
# Start a rabbitmq instance that workers outside the environment can connect to
3233
start-rabbitmq:
3334
docker run -d --rm --name banner-screenshots-rabbitmq -p 5672:5672 rabbitmq
3435

docker-compose.dev.example.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
QUEUE_URL: amqp://rabbitmq
1212

1313
# Run multiple instances of screenshot worker to parallelize screenshot jobs.
14-
# Should be less than 5 to be sure not to run into limits
14+
# Should be less than 4 to be sure not to run into limits
1515
screenshot_worker_1:
1616
build: .
1717
entrypoint: [ "npx", "ts-node", "screenshot_worker.ts", "--verbose" ]
@@ -51,20 +51,6 @@ services:
5151
TB_KEY: ${TB_KEY}
5252
TB_SECRET: ${TB_SECRET}
5353

54-
screenshot_worker_4:
55-
build: .
56-
entrypoint: [ "npx", "ts-node", "screenshot_worker.ts", "--verbose" ]
57-
volumes:
58-
- ./banner-shots:/app/banner-shots
59-
- ./campaign_info.example.toml:/app/campaign_info.toml
60-
depends_on:
61-
- rabbitmq
62-
environment:
63-
QUEUE_URL: amqp://rabbitmq
64-
TB_KEY: ${TB_KEY}
65-
TB_SECRET: ${TB_SECRET}
66-
67-
6854
rabbitmq:
6955
ports:
7056
- "5672:5672"

docker-compose.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
QUEUE_URL: amqp://rabbitmq
99

1010
# Run multiple instances of screenshot worker to parallelize screenshot jobs.
11-
# Should be less than 5 to be sure not to run into limits
11+
# Should be less than 4 to be sure not to run into limits
1212
screenshot_worker_1:
1313
build: .
1414
entrypoint: [ "npx", "ts-node", "screenshot_worker.ts", "--verbose" ]
@@ -39,16 +39,5 @@ services:
3939
TB_KEY: ${TB_KEY}
4040
TB_SECRET: ${TB_SECRET}
4141

42-
screenshot_worker_4:
43-
build: .
44-
entrypoint: [ "npx", "ts-node", "screenshot_worker.ts", "--verbose" ]
45-
depends_on:
46-
- rabbitmq
47-
environment:
48-
QUEUE_URL: amqp://rabbitmq
49-
TB_KEY: ${TB_KEY}
50-
TB_SECRET: ${TB_SECRET}
51-
52-
5342
rabbitmq:
5443
image: "rabbitmq"

0 commit comments

Comments
 (0)