-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from t-koike/problem2
Problem2 の docker-compose.yml とその他の設定ファイルを追加
- Loading branch information
Showing
12 changed files
with
190 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,53 @@ | ||
version: "3" | ||
|
||
networks: | ||
front: | ||
ipam: | ||
config: | ||
- subnet: 10.0.0.0/16 | ||
back: | ||
ipam: | ||
config: | ||
- subnet: 10.10.0.0/16 | ||
|
||
volumes: | ||
socket: | ||
driver: local | ||
log: | ||
driver: local | ||
docroot: | ||
driver: local | ||
|
||
services: | ||
reverse_proxy: | ||
image: nginx:latest | ||
container_name: reverse_proxy | ||
networks: | ||
- front | ||
ports: | ||
- "8080:80" | ||
volumes: | ||
- ./docroot:/usr/share/nginx/html | ||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf | ||
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf | ||
# app: | ||
# build: ../problem1/app/ | ||
# container_name: minimal_sns_app | ||
# volumes: | ||
# - socket:/var/run/unicorn/ | ||
# networks: | ||
# - front | ||
# environment: | ||
# - "TZ=Asia/Tokyo" | ||
db: | ||
image: mysql:latest | ||
container_name: db | ||
networks: | ||
- back | ||
volumes: | ||
- ./mysql/my.cnf:/etc/mysql/my.cnf | ||
- ./mysql/conf.d/mysql.cnf:/etc/mysql/conf.d/mysql.cnf | ||
- ./mysql/0_init.sql:/docker-entrypoint-initdb.d/0_init.sql | ||
environment: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: 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,5 @@ | ||
<html> | ||
<body> | ||
404 Page | ||
</body> | ||
</html> |
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,5 @@ | ||
<html> | ||
<body> | ||
Error Page | ||
</body> | ||
</html> |
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,5 @@ | ||
<html> | ||
<body> | ||
Maintenance Page | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 @@ | ||
<html> | ||
<body> | ||
Top Page | ||
</body> | ||
</html> |
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,20 @@ | ||
CREATE TABLE `users` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`user_id` int(11) NOT NULL, | ||
`name` varchar(64) DEFAULT '' NOT NULL, | ||
PRIMARY KEY (`id`) | ||
); | ||
-- user1 user2 | ||
CREATE TABLE `friend_link` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`user1_id` int(11) NOT NULL, | ||
`user2_id` int(11) NOT NULL, | ||
PRIMARY KEY (`id`) | ||
); | ||
-- user1 user2 block | ||
CREATE TABLE `block_list` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`user1_id` int(11) NOT NULL, | ||
`user2_id` int(11) NOT NULL, | ||
PRIMARY KEY (`id`) | ||
); |
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 @@ | ||
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License, version 2.0, | ||
# as published by the Free Software Foundation. | ||
# | ||
# This program is also distributed with certain software (including | ||
# but not limited to OpenSSL) that is licensed under separate terms, | ||
# as designated in a particular file or component or in included license | ||
# documentation. The authors of MySQL hereby grant you an additional | ||
# permission to link the program and your derivative works with the | ||
# separately licensed software that they have included with MySQL. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License, version 2.0, for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
# | ||
# The MySQL Client configuration file. | ||
# | ||
# For explanations see | ||
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html | ||
|
||
[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 @@ | ||
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; version 2 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
# | ||
# The MySQL Server configuration file. | ||
# | ||
# For explanations see | ||
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html | ||
|
||
[mysqld] | ||
pid-file = /var/run/mysqld/mysqld.pid | ||
socket = /var/run/mysqld/mysqld.sock | ||
datadir = /var/lib/mysql | ||
secure-file-priv= NULL | ||
|
||
# Custom config should go here | ||
!includedir /etc/mysql/conf.d/ |
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 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
server_name localhost; | ||
|
||
# FIXME | ||
} | ||
|
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,31 @@ | ||
user nginx; | ||
worker_processes auto; | ||
|
||
error_log /var/log/nginx/error.log notice; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
#gzip on; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
} |