Compare commits

...

3 Commits

Author SHA1 Message Date
Skylar Ittner 597a0546ce Fix markdown formatting 2023-05-03 19:18:08 -06:00
Skylar Ittner 8b6eb55927 Merge pull request 'Added docker files' (#5) from nikkilocke/Captcheck:master into master
Reviewed-on: https://source.netsyms.com/Netsyms/Captcheck/pulls/5
2023-05-03 19:16:35 -06:00
Nikki Locke a9b363c0b1 Added docker files 2022-02-16 12:19:18 +00:00
4 changed files with 50 additions and 1 deletions

10
.env Executable file
View File

@ -0,0 +1,10 @@
SUBNET=172.16.28
EXPOSE_APACHE_WEB_SERVER_ON_PORT=8787
EXPOSE_APACHE_WEB_SERVER_ONLY_ON_IP_ADDRESS_COLON=
EXPOSE_MARIADB_ON_PORT=3386
MARIADB_ROOT_PASSWORD=qwerty
MARIADB_USERNAME=root
MARIADB_PASSWORD=qwerty
MARIADB_HOSTNAME=mariadb
MARIADB_PORT=3306
MARIADB_DATABASE_NAME=captcheck

26
docker-compose.yml Executable file
View File

@ -0,0 +1,26 @@
version: "3.6"
services:
web:
build: ./docker-web
restart: always
ports:
- ${EXPOSE_APACHE_WEB_SERVER_ONLY_ON_IP_ADDRESS_COLON}${EXPOSE_APACHE_WEB_SERVER_ON_PORT}:80
volumes:
- .:/var/www/html
environment:
MARIADB_USERNAME: ${MARIADB_USERNAME}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MARIADB_HOSTNAME: ${MARIADB_HOSTNAME}
MARIADB_PORT: ${MARIADB_PORT}
MARIADB_DATABASE_NAME: ${MARIADB_DATABASE_NAME}
mariadb:
image: mariadb:10.4
restart: always
volumes:
- ./data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
ports:
- 127.0.0.1:${EXPOSE_MARIADB_ON_PORT}:${MARIADB_PORT}

13
docker-web/Dockerfile Executable file
View File

@ -0,0 +1,13 @@
FROM php:7.2-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN docker-php-ext-enable mysqli
RUN a2enmod rewrite
RUN apt-get update && apt-get install -y zlib1g-dev libpng-dev libfreetype6-dev
RUN docker-php-ext-configure gd --with-gd --with-zlib-dir --with-png-dir --with-freetype-dir
RUN docker-php-ext-install gd

View File

@ -47,7 +47,7 @@ Example responses:
`{"session":"some_session_id","result":true}`
`{"session":"some_session_id","result":false,"msg":"Answer incorrect."}`
###Content-Security-Policy and Nonces
### Content-Security-Policy and Nonces
Add `data-stylenonce="nonce_here"` to the `.captcheck_container` div.
If you have multiple CAPTCHAs on one page, only one of them needs the nonce