-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
1 parent
f5bd46c
commit 8079289
Showing
6 changed files
with
55 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
.idea | ||
*.DS_Store | ||
cypress/videos/ | ||
cypress/screenshots/ | ||
cypress/screenshots/ | ||
docker/data |
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 @@ | ||
FROM php:7.3-apache | ||
COPY . /var/www/html/ | ||
RUN docker-php-ext-install mysqli | ||
RUN bash /var/www/html/docker/make_docker.sh |
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 |
---|---|---|
|
@@ -62,6 +62,17 @@ Feel free to modify the code and open any pull requests. | |
* [ ] Add more links | ||
* [ ] Fix any typos | ||
|
||
## Running locally | ||
|
||
You can run nothing private locally via docker using the commands below: | ||
```bash | ||
git clone [email protected]:gautamkrishnar/nothing-private.git | ||
cd nothing-private | ||
docker-compose up -d # use --build to update image if you do 'git pull' | ||
``` | ||
|
||
Visit http://localhost/ | ||
|
||
## Contributors | ||
Special thanks to these rockstars: | ||
|
||
|
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,27 @@ | ||
version: "3.1" | ||
services: | ||
app: | ||
build: . | ||
ports: | ||
- "80:80" | ||
restart: always | ||
networks: | ||
- default | ||
database: | ||
image: mysql:8.0 | ||
command: --default-authentication-plugin=mysql_native_password | ||
expose: | ||
- '3306' | ||
environment: | ||
MYSQL_DATABASE: safedb | ||
MYSQL_USER: safeuser | ||
MYSQL_PASSWORD: safeuser | ||
MYSQL_ROOT_PASSWORD: safeuser | ||
restart: always | ||
volumes: | ||
- ./db_server:/docker-entrypoint-initdb.d | ||
- ./docker/data:/var/lib/mysql | ||
networks: | ||
- default | ||
networks: | ||
default: |
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,9 @@ | ||
<?php | ||
|
||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); | ||
set_exception_handler(function ($e) { | ||
die('Error occurred!'); | ||
}); | ||
|
||
$mysqli = new mysqli('database', 'safeuser', 'safeuser', 'safedb'); | ||
$mysqli->set_charset('utf8mb4'); |
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 @@ | ||
sed -i 's/window.location.protocol + \"\/\/nothingprivate.000webhostapp.com\"/document.location.href + \"\db_server\"/g' /var/www/html/main.js | ||
cp -fv /var/www/html/docker/docker-connection.php /var/www/html/db_server/connection.php |