Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM php:7-apache
MAINTAINER Tool Tooling
FROM php:7.2.32-apache-buster
#MAINTAINER Tool Tooling

RUN docker-php-ext-install mysqli
COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
COPY start-apache /usr/local/bin
RUN a2enmod rewrite
RUN chmod +x /usr/local/bin/start-apache && a2enmod rewrite

# Copy application source
COPY html /var/www
RUN chown -R www-data:www-data /var/www

EXPOSE 80

CMD ["start-apache"]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This repository hosts the code for the StegTechHub tooling website. The website

## Technologies Used

The project leverages the following technologies:
The project leverages the following technologies:..

- **Backend:**
- PHP 8.3
Expand All @@ -28,3 +28,6 @@ The project leverages the following technologies:
| Docker Tag | GitHub Release | Nginx Version | PHP Version | Ubuntu Version |
|-----|-------|-----|--------|--------|
| latest | master Branch |1.17.2 | 8.3 | Latest |

....
adding a new line for test publish again
16 changes: 8 additions & 8 deletions html/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
session_start();

// connect to database
$db = mysqli_connect('127.0.0.1', 'admin', 'admin', 'tooling');
$db = mysqli_connect('mysql-server2', 'Willie', 'Password123', 'tooling');

// Check connection
// if (mysqli_connect_errno()) {
// echo "Failed to connect to MySQL: " . mysqli_connect_error();
// exit();
// }
// else{
// echo "connected";
// }
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
exit();
}
else{
echo "connected";
}

// variable declaration
$username = "";
Expand Down
33 changes: 33 additions & 0 deletions tooling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: "3.9"
services:
tooling_frontend:
build: .
ports:
- "5001:80"
volumes:
- tooling_frontend:/var/www/html
links:
- db
networks:
- dbnet

db:
image: mysql:5.7
restart: always
container_name: mysql-server2
environment:
MYSQL_DATABASE: tooling
MYSQL_USER: Willie
MYSQL_PASSWORD: Password123
MYSQL_RANDOM_ROOT_PASSWORD: Password123
volumes:
- db:/var/lib/mysql
networks:
- dbnet
volumes:
tooling_frontend:
db:

networks:
dbnet:
driver: bridge