remove nginx Dockerfile because it's not actually necessary
This commit is contained in:
parent
ffeb900d89
commit
82059bbfb0
6 changed files with 59 additions and 276 deletions
50
.travis.yml
50
.travis.yml
|
@ -22,33 +22,39 @@ script:
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# only run this if on the master branch eventually, not while testing tho
|
# only run this if on the master branch eventually, not while testing tho
|
||||||
- sudo apt-get install -y python3.4
|
# - sudo apt-get install -y python3.4
|
||||||
- sudo apt-get install --upgrade -y python-pip
|
# - sudo apt-get install --upgrade -y python-pip
|
||||||
- sudo apt-get install jq
|
# - sudo apt-get install jq
|
||||||
- sudo pip install --user virtualenv
|
# - sudo pip install --user virtualenv
|
||||||
# Create a virtual environment for AWS CLI
|
# # Create a virtual environment for AWS CLI
|
||||||
- virtualenv my_py3 --python=/usr/bin/python3.4
|
# - virtualenv my_py3 --python=/usr/bin/python3.4
|
||||||
- source my_py3/bin/activate
|
# - source my_py3/bin/activate
|
||||||
- pip install --upgrade awscli
|
# - pip install --upgrade awscli
|
||||||
- pip install --upgrade awsebcli
|
# - pip install --upgrade awsebcli
|
||||||
# Set AWS information
|
# # Set AWS information
|
||||||
- aws configure set aws_access_key_id $AWS_ACCESS_KEY
|
# - aws configure set aws_access_key_id $AWS_ACCESS_KEY
|
||||||
- aws configure set aws_secret_access_key $AWS_SECRET_KEY
|
# - aws configure set aws_secret_access_key $AWS_SECRET_KEY
|
||||||
- aws configure set default.region $AWS_REGION
|
# - aws configure set default.region $AWS_REGION
|
||||||
- aws configure set metadata_service_timeout 1200
|
# - aws configure set metadata_service_timeout 1200
|
||||||
- aws configure set metadata_service_num_attempts 3
|
# - aws configure set metadata_service_num_attempts 3
|
||||||
- aws configure list
|
# - aws configure list
|
||||||
# build images
|
# build images
|
||||||
- docker-compose stop
|
- docker-compose stop
|
||||||
- docker-compose build --no-cache
|
- docker-compose build --no-cache
|
||||||
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
||||||
- docker image ls
|
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_BUILD_ID
|
||||||
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:app_$TRAVIS_BUILD_ID
|
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_BUILD_ID
|
||||||
- docker tag $NGINX_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:nginx_$TRAVIS_BUILD_ID
|
|
||||||
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:app_$TRAVIS_BUILD_ID
|
|
||||||
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:nginx_$TRAVIS_BUILD_ID
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- APP_IMAGE_NAME=p5jswebeditor_app
|
- APP_IMAGE_NAME=p5jswebeditor_app
|
||||||
- NGINX_IMAGE_NAME=p5jswebeditor_nginx
|
|
||||||
|
deploy:
|
||||||
|
provider: elasticbeanstalk
|
||||||
|
access_key_id: $AWS_ACCESS_KEY
|
||||||
|
secret_access_key:
|
||||||
|
secure: $AWS_SECRET_KEY
|
||||||
|
region: $AWS_REGION
|
||||||
|
app: $AWS_EBS_APP
|
||||||
|
env: $AWS_EBS_ENV
|
||||||
|
bucket_name: "the-target-S3-bucket"
|
|
@ -33,7 +33,7 @@
|
||||||
"mountPoints": [
|
"mountPoints": [
|
||||||
{
|
{
|
||||||
"sourceVolume": "storage",
|
"sourceVolume": "storage",
|
||||||
"containerPath": "/var/lib/mysql"
|
"containerPath": "/var/opt/mongo"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"environment": [
|
"environment": [
|
||||||
|
@ -64,10 +64,30 @@
|
||||||
"mountPoints": [
|
"mountPoints": [
|
||||||
{
|
{
|
||||||
"sourceVolume": "app",
|
"sourceVolume": "app",
|
||||||
"containerPath": "/var/www/html",
|
"containerPath": "/var/opt/app",
|
||||||
"readOnly": true
|
"readOnly": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nginx",
|
||||||
|
"essential": true,
|
||||||
|
"memory": 128,
|
||||||
|
"portMappings": [
|
||||||
|
{
|
||||||
|
"hostPort": 80,
|
||||||
|
"containerPort": 8000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"mountPoints": [
|
||||||
|
{
|
||||||
|
"sourceVolume": "awseb-logs-nginx-proxy",
|
||||||
|
"containerPath": "/var/log/nginx"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -10,19 +10,23 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- '27017:27017'
|
- '27017:27017'
|
||||||
# restart: always
|
# restart: always
|
||||||
# env_file:
|
env_file:
|
||||||
# - .env
|
- .env
|
||||||
nginx:
|
nginx:
|
||||||
build: ./nginx
|
image: nginx:1.13
|
||||||
|
volumes:
|
||||||
|
- "$PWD/nginx/alpha.editor.p5js.org.conf:/etc/nginx/conf.d/default.conf"
|
||||||
ports:
|
ports:
|
||||||
- '80:80'
|
- '80:80'
|
||||||
|
depends_on:
|
||||||
|
- app
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
target: production
|
target: production
|
||||||
# env_file:
|
env_file:
|
||||||
# - .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
- MONGO_URL=mongodb://mongo:27017/p5js-web-editor
|
- MONGO_URL=mongodb://mongo:27017/p5js-web-editor
|
||||||
- MONGO_HOSTNAME=mongo
|
- MONGO_HOSTNAME=mongo
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginx:1.13.12
|
|
||||||
|
|
||||||
COPY alpha.editor.p5js.org.conf /etc/nginx/conf.d/default.conf
|
|
|
@ -1,122 +0,0 @@
|
||||||
# For more information on configuration, see:
|
|
||||||
# * Official English Documentation: http://nginx.org/en/docs/
|
|
||||||
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
|
||||||
|
|
||||||
user nginx;
|
|
||||||
worker_processes auto;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
pid /var/run/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
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;
|
|
||||||
tcp_nodelay on;
|
|
||||||
keepalive_timeout 65;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
|
||||||
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
|
||||||
# for more information.
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
|
|
||||||
include /etc/nginx/sites-enabled/*.conf;
|
|
||||||
|
|
||||||
index index.html index.htm;
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80 default_server;
|
|
||||||
listen [::]:80 default_server;
|
|
||||||
server_name localhost;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
|
|
||||||
# Load configuration files for the default server block.
|
|
||||||
include /etc/nginx/default.d/*.conf;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
}
|
|
||||||
|
|
||||||
# redirect server error pages to the static page /40x.html
|
|
||||||
#
|
|
||||||
error_page 404 /404.html;
|
|
||||||
location = /40x.html {
|
|
||||||
}
|
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
|
||||||
#
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
}
|
|
||||||
|
|
||||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# proxy_pass http://127.0.0.1;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# root html;
|
|
||||||
# fastcgi_pass 127.0.0.1:9000;
|
|
||||||
# fastcgi_index index.php;
|
|
||||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
|
||||||
# include fastcgi_params;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# deny access to .htaccess files, if Apache's document root
|
|
||||||
# concurs with nginx's one
|
|
||||||
#
|
|
||||||
#location ~ /\.ht {
|
|
||||||
# deny all;
|
|
||||||
#}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Settings for a TLS enabled server.
|
|
||||||
#
|
|
||||||
# server {
|
|
||||||
# listen 443 ssl;
|
|
||||||
# listen [::]:443 ssl;
|
|
||||||
# server_name localhost;
|
|
||||||
# root /usr/share/nginx/html;
|
|
||||||
#
|
|
||||||
# ssl_certificate "/etc/pki/nginx/server.crt";
|
|
||||||
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
|
|
||||||
# # It is *strongly* recommended to generate unique DH parameters
|
|
||||||
# # Generate them with: openssl dhparam -out /etc/pki/nginx/dhparams.pem 2048
|
|
||||||
# #ssl_dhparam "/etc/pki/nginx/dhparams.pem";
|
|
||||||
# ssl_session_cache shared:SSL:1m;
|
|
||||||
# ssl_session_timeout 10m;
|
|
||||||
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
|
||||||
# ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP;
|
|
||||||
# ssl_prefer_server_ciphers on;
|
|
||||||
#
|
|
||||||
# # Load configuration files for the default server block.
|
|
||||||
# include /etc/nginx/default.d/*.conf;
|
|
||||||
#
|
|
||||||
# location / {
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# error_page 404 /404.html;
|
|
||||||
# location = /40x.html {
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# error_page 500 502 503 504 /50x.html;
|
|
||||||
# location = /50x.html {
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
|
|
||||||
}
|
|
122
nginx/nginx.conf
122
nginx/nginx.conf
|
@ -1,122 +0,0 @@
|
||||||
# For more information on configuration, see:
|
|
||||||
# * Official English Documentation: http://nginx.org/en/docs/
|
|
||||||
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
|
||||||
|
|
||||||
user nginx;
|
|
||||||
worker_processes auto;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
pid /var/run/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
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;
|
|
||||||
tcp_nodelay on;
|
|
||||||
keepalive_timeout 65;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
|
||||||
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
|
||||||
# for more information.
|
|
||||||
# include /etc/nginx/conf.d/*.conf;
|
|
||||||
|
|
||||||
include /etc/nginx/sites-enabled/*.conf;
|
|
||||||
|
|
||||||
# index index.html index.htm;
|
|
||||||
|
|
||||||
# server {
|
|
||||||
# listen 80 default_server;
|
|
||||||
# listen [::]:80 default_server;
|
|
||||||
# server_name localhost;
|
|
||||||
# root /usr/share/nginx/html;
|
|
||||||
|
|
||||||
# # Load configuration files for the default server block.
|
|
||||||
# include /etc/nginx/default.d/*.conf;
|
|
||||||
|
|
||||||
# location / {
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # redirect server error pages to the static page /40x.html
|
|
||||||
# #
|
|
||||||
# error_page 404 /404.html;
|
|
||||||
# location = /40x.html {
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # redirect server error pages to the static page /50x.html
|
|
||||||
# #
|
|
||||||
# error_page 500 502 503 504 /50x.html;
|
|
||||||
# location = /50x.html {
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
||||||
# #
|
|
||||||
# #location ~ \.php$ {
|
|
||||||
# # proxy_pass http://127.0.0.1;
|
|
||||||
# #}
|
|
||||||
|
|
||||||
# # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
||||||
# #
|
|
||||||
# #location ~ \.php$ {
|
|
||||||
# # root html;
|
|
||||||
# # fastcgi_pass 127.0.0.1:9000;
|
|
||||||
# # fastcgi_index index.php;
|
|
||||||
# # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
|
||||||
# # include fastcgi_params;
|
|
||||||
# #}
|
|
||||||
|
|
||||||
# # deny access to .htaccess files, if Apache's document root
|
|
||||||
# # concurs with nginx's one
|
|
||||||
# #
|
|
||||||
# #location ~ /\.ht {
|
|
||||||
# # deny all;
|
|
||||||
# #}
|
|
||||||
# }
|
|
||||||
|
|
||||||
|
|
||||||
# Settings for a TLS enabled server.
|
|
||||||
#
|
|
||||||
# server {
|
|
||||||
# listen 443 ssl;
|
|
||||||
# listen [::]:443 ssl;
|
|
||||||
# server_name localhost;
|
|
||||||
# root /usr/share/nginx/html;
|
|
||||||
#
|
|
||||||
# ssl_certificate "/etc/pki/nginx/server.crt";
|
|
||||||
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
|
|
||||||
# # It is *strongly* recommended to generate unique DH parameters
|
|
||||||
# # Generate them with: openssl dhparam -out /etc/pki/nginx/dhparams.pem 2048
|
|
||||||
# #ssl_dhparam "/etc/pki/nginx/dhparams.pem";
|
|
||||||
# ssl_session_cache shared:SSL:1m;
|
|
||||||
# ssl_session_timeout 10m;
|
|
||||||
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
|
||||||
# ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP;
|
|
||||||
# ssl_prefer_server_ciphers on;
|
|
||||||
#
|
|
||||||
# # Load configuration files for the default server block.
|
|
||||||
# include /etc/nginx/default.d/*.conf;
|
|
||||||
#
|
|
||||||
# location / {
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# error_page 404 /404.html;
|
|
||||||
# location = /40x.html {
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# error_page 500 502 503 504 /50x.html;
|
|
||||||
# location = /50x.html {
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue