This repository has been archived by the owner on May 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
144 changed files
with
116 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,6 @@ | ||
FROM php:7.0-fpm | ||
|
||
MAINTAINER udspj | ||
|
||
RUN docker-php-ext-install mbstring pdo pdo_mysql | ||
|
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,29 @@ | ||
<?php | ||
|
||
header("Access-Control-Allow-Origin: *"); | ||
|
||
$dsn = 'mysql:dbname=bnrank;host=db;port=3306'; | ||
$user = 'root'; | ||
$password = 'linkidrank233'; | ||
|
||
$addr = $_POST['address']; | ||
|
||
try { | ||
|
||
if (!empty($addr)) { | ||
$conn = new PDO($dsn, $user, $password); | ||
$datetime = date('Y-m-d H:i:s'); | ||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | ||
// $sql = "REPLACE INTO ranklist (address, collecttime) VALUES (:addr, '$datetime')"; | ||
// $conn->bindParam(':addr', $_POST['address'], PDO::PARAM_STR); | ||
// $conn->exec($sql); | ||
$stmt = $conn->prepare("insert ignore into ranklist (address, collecttime) VALUES (:addr, '$datetime')"); | ||
$stmt->bindParam(':addr', $_POST['address'], PDO::PARAM_STR); | ||
$stmt->execute(); | ||
} | ||
|
||
} catch (PDOException $e) { | ||
echo $e->getMessage(); | ||
} | ||
|
||
?> |
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 @@ | ||
<?php | ||
|
||
header("Access-Control-Allow-Origin: *"); | ||
|
||
$dsn = 'mysql:dbname=bnrank;host=db;port=3306'; | ||
$user = 'root'; | ||
$password = 'linkidrank233'; | ||
|
||
try { | ||
|
||
$conn = new PDO($dsn, $user, $password); | ||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | ||
|
||
$sth = $conn->prepare("SELECT address,collecttime from ranklist ORDER BY collecttime limit 100"); | ||
$sth->execute(); | ||
$result = $sth->fetchAll(PDO::FETCH_ASSOC); | ||
$json = json_encode($result); | ||
print_r($json); | ||
|
||
} catch (PDOException $e) { | ||
echo $e->getMessage(); | ||
} | ||
|
||
?> |
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,32 @@ | ||
version: "3" | ||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: ./app/Dockerfile | ||
|
||
db: | ||
image: mysql:5.6 | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: 123456 | ||
ports: | ||
- "8800:3306" | ||
volumes: | ||
- "./mysql-data:/var/lib/mysql" | ||
|
||
web: | ||
image: nginx:latest | ||
depends_on: | ||
- "db" | ||
- "app" | ||
ports: | ||
- "8888:80" | ||
volumes: | ||
- ./code:/code | ||
- ./site.conf:/etc/nginx/conf.d/000_site.conf | ||
links: | ||
- "db" | ||
- "app" | ||
|
||
|
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 @@ | ||
[auto] | ||
server-uuid=85bce7b9-3815-11e8-8b3d-0242ac130003 |
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 @@ | ||
default-character-set=latin1 | ||
default-collation=latin1_swedish_ci |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
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 @@ | ||
�% test �% test\_% |
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
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 @@ | ||
�localhost root Z����b8ff28e68184 root Z��� |
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.42 KB
api/coin_girl_ranking/mysql-data/performance_schema/cond_instances.frm
Binary file not shown.
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 @@ | ||
default-character-set=utf8 | ||
default-collation=utf8_general_ci |
Binary file added
BIN
+8.78 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_stages_current.frm
Binary file not shown.
Binary file added
BIN
+8.78 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_stages_history.frm
Binary file not shown.
Binary file added
BIN
+8.78 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_stages_history_long.frm
Binary file not shown.
Binary file added
BIN
+8.67 KB
..._ranking/mysql-data/performance_schema/events_stages_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
...irl_ranking/mysql-data/performance_schema/events_stages_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.65 KB
...l_ranking/mysql-data/performance_schema/events_stages_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
...irl_ranking/mysql-data/performance_schema/events_stages_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.61 KB
...girl_ranking/mysql-data/performance_schema/events_stages_summary_global_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+10.3 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_statements_current.frm
Binary file not shown.
Binary file added
BIN
+10.3 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_statements_history.frm
Binary file not shown.
Binary file added
BIN
+10.3 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_statements_history_long.frm
Binary file not shown.
Binary file added
BIN
+9.77 KB
...king/mysql-data/performance_schema/events_statements_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.87 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_statements_summary_by_digest.frm
Binary file not shown.
Binary file added
BIN
+9.74 KB
...ranking/mysql-data/performance_schema/events_statements_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.75 KB
...nking/mysql-data/performance_schema/events_statements_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.74 KB
...ranking/mysql-data/performance_schema/events_statements_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.71 KB
..._ranking/mysql-data/performance_schema/events_statements_summary_global_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.17 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_waits_current.frm
Binary file not shown.
Binary file added
BIN
+9.17 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_waits_history.frm
Binary file not shown.
Binary file added
BIN
+9.17 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_waits_history_long.frm
Binary file not shown.
Binary file added
BIN
+8.67 KB
...l_ranking/mysql-data/performance_schema/events_waits_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
...girl_ranking/mysql-data/performance_schema/events_waits_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.67 KB
api/coin_girl_ranking/mysql-data/performance_schema/events_waits_summary_by_instance.frm
Binary file not shown.
Binary file added
BIN
+8.65 KB
...rl_ranking/mysql-data/performance_schema/events_waits_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
...girl_ranking/mysql-data/performance_schema/events_waits_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.61 KB
..._girl_ranking/mysql-data/performance_schema/events_waits_summary_global_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.45 KB
api/coin_girl_ranking/mysql-data/performance_schema/file_instances.frm
Binary file not shown.
Binary file added
BIN
+9.51 KB
api/coin_girl_ranking/mysql-data/performance_schema/file_summary_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.61 KB
api/coin_girl_ranking/mysql-data/performance_schema/file_summary_by_instance.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.48 KB
api/coin_girl_ranking/mysql-data/performance_schema/mutex_instances.frm
Binary file not shown.
Binary file added
BIN
+8.7 KB
api/coin_girl_ranking/mysql-data/performance_schema/objects_summary_global_by_type.frm
Binary file not shown.
Binary file added
BIN
+8.57 KB
api/coin_girl_ranking/mysql-data/performance_schema/performance_timers.frm
Binary file not shown.
Binary file added
BIN
+8.55 KB
api/coin_girl_ranking/mysql-data/performance_schema/rwlock_instances.frm
Binary file not shown.
Binary file added
BIN
+8.51 KB
api/coin_girl_ranking/mysql-data/performance_schema/session_account_connect_attrs.frm
Binary file not shown.
Binary file added
BIN
+8.51 KB
api/coin_girl_ranking/mysql-data/performance_schema/session_connect_attrs.frm
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.4 KB
api/coin_girl_ranking/mysql-data/performance_schema/setup_consumers.frm
Binary file not shown.
Binary file added
BIN
+8.43 KB
api/coin_girl_ranking/mysql-data/performance_schema/setup_instruments.frm
Binary file not shown.
Binary file added
BIN
+8.55 KB
api/coin_girl_ranking/mysql-data/performance_schema/setup_objects.frm
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.61 KB
api/coin_girl_ranking/mysql-data/performance_schema/socket_instances.frm
Binary file not shown.
Binary file added
BIN
+9.51 KB
api/coin_girl_ranking/mysql-data/performance_schema/socket_summary_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.57 KB
api/coin_girl_ranking/mysql-data/performance_schema/socket_summary_by_instance.frm
Binary file not shown.
Binary file added
BIN
+10.3 KB
...coin_girl_ranking/mysql-data/performance_schema/table_io_waits_summary_by_index_usage.frm
Binary file not shown.
Binary file added
BIN
+10.2 KB
api/coin_girl_ranking/mysql-data/performance_schema/table_io_waits_summary_by_table.frm
Binary file not shown.
Binary file added
BIN
+13.2 KB
api/coin_girl_ranking/mysql-data/performance_schema/table_lock_waits_summary_by_table.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,17 @@ | ||
server { | ||
index index.php index.html; | ||
server_name localhost; | ||
error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | ||
root /code; | ||
|
||
location ~ \.php$ { | ||
try_files $uri =404; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass app:9000; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
} | ||
} |