thepopebot 1.2.18 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/setup/lib/auth.mjs
CHANGED
|
@@ -129,8 +129,9 @@ export function writeEnvFile(config) {
|
|
|
129
129
|
|
|
130
130
|
# Auth.js secret (used for session encryption)
|
|
131
131
|
AUTH_SECRET=${authSecret}
|
|
132
|
+
AUTH_TRUST_HOST=true
|
|
132
133
|
|
|
133
|
-
# GitHub Personal Access Token (fine-grained: Actions, Contents, Metadata, Pull requests)
|
|
134
|
+
# GitHub Personal Access Token (fine-grained: Actions, Administration, Contents, Metadata, Pull requests)
|
|
134
135
|
GH_TOKEN=${githubToken}
|
|
135
136
|
|
|
136
137
|
# Repository info
|
package/setup/setup.mjs
CHANGED
|
@@ -285,6 +285,7 @@ async function main() {
|
|
|
285
285
|
console.log(chalk.dim(` Create a fine-grained PAT scoped to ${chalk.bold(`${owner}/${repo}`)} only:\n`));
|
|
286
286
|
console.log(chalk.dim(' \u2022 Repository access: Only select repositories \u2192 ') + chalk.bold(`${owner}/${repo}`));
|
|
287
287
|
console.log(chalk.dim(' \u2022 Actions: Read and write'));
|
|
288
|
+
console.log(chalk.dim(' \u2022 Administration: Read and write (required for self-hosted runners)'));
|
|
288
289
|
console.log(chalk.dim(' \u2022 Contents: Read and write'));
|
|
289
290
|
console.log(chalk.dim(' \u2022 Metadata: Read-only (required, auto-selected)'));
|
|
290
291
|
console.log(chalk.dim(' \u2022 Pull requests: Read and write'));
|
package/templates/.env.example
CHANGED
|
@@ -4,7 +4,8 @@ RUN apt-get update && apt-get install -y curl python3 make g++ && rm -rf /var/li
|
|
|
4
4
|
|
|
5
5
|
WORKDIR /app
|
|
6
6
|
COPY package.json package-lock.json* ./
|
|
7
|
-
RUN npm install --omit=dev
|
|
7
|
+
RUN npm install --omit=dev && \
|
|
8
|
+
npm install --no-save thepopebot@$(node -p "require('./package.json').version")
|
|
8
9
|
|
|
9
10
|
EXPOSE 80
|
|
10
11
|
CMD ["node_modules/.bin/next", "start", "-p", "80"]
|
|
@@ -6,11 +6,13 @@ services:
|
|
|
6
6
|
- --providers.docker.exposedByDefault=false
|
|
7
7
|
- --entrypoints.web.address=:80
|
|
8
8
|
- --entrypoints.websecure.address=:443
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- --
|
|
12
|
-
- --
|
|
13
|
-
- --certificatesresolvers.letsencrypt.acme.
|
|
9
|
+
## Uncomment the following lines to enable TLS via Let's Encrypt
|
|
10
|
+
## (requires LETSENCRYPT_EMAIL in .env):
|
|
11
|
+
# - --entrypoints.web.http.redirections.entrypoint.to=websecure
|
|
12
|
+
# - --entrypoints.web.http.redirections.entrypoint.scheme=https
|
|
13
|
+
# - --certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}
|
|
14
|
+
# - --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
|
|
15
|
+
# - --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|
|
14
16
|
ports:
|
|
15
17
|
- "80:80"
|
|
16
18
|
- "443:443"
|
|
@@ -22,20 +24,17 @@ services:
|
|
|
22
24
|
event_handler:
|
|
23
25
|
image: ${EVENT_HANDLER_IMAGE_URL:-stephengpope/thepopebot:event-handler-${THEPOPEBOT_VERSION:-latest}}
|
|
24
26
|
volumes:
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- ./data:/app/data
|
|
28
|
-
- ./.env:/app/.env:ro
|
|
29
|
-
- ./cron:/app/cron
|
|
30
|
-
- ./triggers:/app/triggers
|
|
31
|
-
- ./logs:/app/logs:ro
|
|
27
|
+
- .:/app
|
|
28
|
+
- /app/node_modules
|
|
32
29
|
labels:
|
|
33
30
|
- traefik.enable=true
|
|
34
31
|
# Set APP_HOSTNAME in .env to the domain from APP_URL (e.g., mybot.example.com)
|
|
35
32
|
- traefik.http.routers.event_handler.rule=Host(`${APP_HOSTNAME}`)
|
|
36
|
-
- traefik.http.routers.event_handler.entrypoints=
|
|
37
|
-
- traefik.http.routers.event_handler.tls.certresolver=letsencrypt
|
|
33
|
+
- traefik.http.routers.event_handler.entrypoints=web
|
|
38
34
|
- traefik.http.services.event_handler.loadbalancer.server.port=80
|
|
35
|
+
## Uncomment the following lines to enable TLS via Let's Encrypt:
|
|
36
|
+
# - traefik.http.routers.event_handler.entrypoints=websecure
|
|
37
|
+
# - traefik.http.routers.event_handler.tls.certresolver=letsencrypt
|
|
39
38
|
restart: unless-stopped
|
|
40
39
|
|
|
41
40
|
runner:
|
|
@@ -44,7 +43,7 @@ services:
|
|
|
44
43
|
REPO_URL: https://github.com/${GH_OWNER}/${GH_REPO}
|
|
45
44
|
ACCESS_TOKEN: ${GH_TOKEN}
|
|
46
45
|
RUNNER_SCOPE: repo
|
|
47
|
-
LABELS: self-hosted
|
|
46
|
+
LABELS: self-hosted
|
|
48
47
|
volumes:
|
|
49
48
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
50
49
|
restart: unless-stopped
|