-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fd15b96
Showing
8 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM node:12 | ||
|
||
# Install requirements for chromium in the node:10 distribution (Debian 9 Stretch) | ||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get -q install -y -V \ | ||
libx11-xcb1 libxtst6 libnss3 libxss1 libasound2 libgtk-3-0 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Expose necessary ports: | ||
# dashboard: | ||
EXPOSE 4000 | ||
# webservice: | ||
EXPOSE 3000 | ||
|
||
# Run as "node" to avoid security complaints from node and co | ||
USER node | ||
WORKDIR /home/node | ||
|
||
# Clone current pa11y-dashboard and install all depenencies (which include pa11y itself and pa11y-webservice) | ||
RUN git clone https://github.com/pa11y/pa11y-dashboard.git pa11y-dashboard \ | ||
&& cd pa11y-dashboard \ | ||
&& npm install | ||
|
||
# Configure for our docker environment with "production" settings | ||
ADD patty-dashboard.production.json pa11y-dashboard/config/production.json | ||
ENV NODE_ENV production | ||
|
||
#COPY docker-entrypoint.sh entrypoint.sh | ||
|
||
WORKDIR pa11y-dashboard | ||
CMD ["start"] | ||
ENTRYPOINT ["npm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 Ernesto Baschny | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
build: | ||
docker-compose build | ||
|
||
run: | ||
docker-compose up -d | ||
|
||
logs: | ||
docker-compose logs -f dashboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
docker-pa11y Dashboard in Docker | ||
================================ | ||
|
||
Test the docker pa11y dashboard and webservice in a docker environment. | ||
|
||
Requirements | ||
------------ | ||
- Docker and the `docker-compose` tool | ||
- Browser | ||
|
||
How to use | ||
---------- | ||
Simply start the containers (dashboard and mongo): | ||
|
||
If you have `make` installed: | ||
``` | ||
make run | ||
``` | ||
else: | ||
``` | ||
docker-compose up -d | ||
``` | ||
|
||
Check the logs: | ||
``` | ||
make logs | ||
``` | ||
or: | ||
``` | ||
docker-compose logs -f dashboard | ||
``` | ||
|
||
Go to the browser: | ||
|
||
http://localhost:4000/ | ||
|
||
See also | ||
-------- | ||
- https://pa11y.org/ | ||
- https://github.com/pa11y/pa11y-dashboard | ||
- https://github.com/pa11y/pa11y-webservice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: "3.7" | ||
|
||
services: | ||
dashboard: | ||
build: . | ||
ports: | ||
- "4000:4000" | ||
- "3000:3000" | ||
networks: | ||
- intern | ||
mongodb: | ||
image: mongo:3.6 | ||
ports: | ||
- "27017" | ||
networks: | ||
- intern | ||
volumes: | ||
- data:/data | ||
|
||
volumes: | ||
data: | ||
|
||
networks: | ||
intern: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
# Start up the dashboard. | ||
cd /home/node/pa11y-dashboard && npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"port": 4000, | ||
"noindex": true, | ||
"readonly": false, | ||
"sitemessage": "Test Dashboard in Docker", | ||
"webservice": { | ||
"database": "mongodb://mongodb/pa11y-webservice", | ||
"host": "127.0.0.1", | ||
"port": 3000, | ||
"cron": "0 30 0 * * *", | ||
"chromeLaunchConfig": { | ||
"args": ["--no-sandbox"] | ||
} | ||
} | ||
} |