updated to make work some settings
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
FROM ruby:3
|
FROM ruby:3
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY Gemfile* .
|
COPY Gemfile* ./
|
||||||
RUN bundle install
|
RUN bundle install
|
||||||
COPY . .
|
COPY . .
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["rails", "server", "-b", "0.0.0.0"]
|
CMD ["rails", "server", "-b", "benchcoach-dev.ascorrea.com"]
|
||||||
|
|||||||
@@ -170,6 +170,8 @@ GEM
|
|||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.15.4-arm64-darwin)
|
nokogiri (1.15.4-arm64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
|
nokogiri (1.15.4-x86_64-linux)
|
||||||
|
racc (~> 1.4)
|
||||||
oauth2 (2.0.9)
|
oauth2 (2.0.9)
|
||||||
faraday (>= 0.17.3, < 3.0)
|
faraday (>= 0.17.3, < 3.0)
|
||||||
jwt (>= 1.0, < 3.0)
|
jwt (>= 1.0, < 3.0)
|
||||||
@@ -254,6 +256,7 @@ GEM
|
|||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.6.3-aarch64-linux)
|
sqlite3 (1.6.3-aarch64-linux)
|
||||||
sqlite3 (1.6.3-arm64-darwin)
|
sqlite3 (1.6.3-arm64-darwin)
|
||||||
|
sqlite3 (1.6.3-x86_64-linux)
|
||||||
stimulus-rails (1.2.2)
|
stimulus-rails (1.2.2)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
teamsnap_rb (3.0.3)
|
teamsnap_rb (3.0.3)
|
||||||
@@ -300,6 +303,7 @@ GEM
|
|||||||
PLATFORMS
|
PLATFORMS
|
||||||
aarch64-linux
|
aarch64-linux
|
||||||
arm64-darwin-22
|
arm64-darwin-22
|
||||||
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bootsnap
|
bootsnap
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ module TeamsnapBenchcoachRails
|
|||||||
# Initialize configuration defaults for originally generated Rails version.
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
config.load_defaults 7.0
|
config.load_defaults 7.0
|
||||||
config.active_record.default_timezone = :local
|
config.active_record.default_timezone = :local
|
||||||
config.hosts << 'smithers.local'
|
config.hosts << 'benchcoach-dev.ascorrea.com'
|
||||||
# Configuration for the application, engines, and railties goes here.
|
# Configuration for the application, engines, and railties goes here.
|
||||||
#
|
#
|
||||||
# These settings can be overridden in specific environments using the files
|
# These settings can be overridden in specific environments using the files
|
||||||
|
|||||||
@@ -1,18 +1,25 @@
|
|||||||
|
version: "3.3"
|
||||||
services:
|
services:
|
||||||
web:
|
app:
|
||||||
build: .
|
build: .
|
||||||
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||||
|
hostname: app
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
environment:
|
||||||
|
TEAMSNAP_CLIENT_ID: "${TEAMSNAP_CLIENT_ID}"
|
||||||
|
TEAMSNAP_CLIENT_SECRET: "${TEAMSNAP_CLIENT_SECRET}"
|
||||||
webserver:
|
webserver:
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
restart: always
|
networks:
|
||||||
|
- internal
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/conf/:/etc/nginx/conf.d/:ro
|
- ./nginx/conf/:/etc/nginx/conf.d/:ro
|
||||||
- ./certbot/www:/var/www/certbot/:ro
|
- ./certbot/www:/var/www/certbot/:ro
|
||||||
@@ -22,3 +29,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./certbot/www/:/var/www/certbot/:rw
|
- ./certbot/www/:/var/www/certbot/:rw
|
||||||
- ./certbot/conf/:/etc/letsencrypt/:rw
|
- ./certbot/conf/:/etc/letsencrypt/:rw
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal:
|
||||||
|
driver: bridge
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name benchcoach.online www.benchcoach.online;
|
server_name benchcoach-dev.ascorrea.com;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
|
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
@@ -10,7 +10,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 301 https://benchcoach.online$request_uri;
|
return 301 https://benchcoach-dev.ascorrea.com$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,12 +18,17 @@ server {
|
|||||||
listen 443 default_server ssl http2;
|
listen 443 default_server ssl http2;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
|
|
||||||
server_name benchcoach.online;
|
server_name benchcoach-dev.ascorrea.com;
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/ssl/live/benchcoach.online/fullchain.pem;
|
ssl_certificate /etc/nginx/ssl/live/benchcoach-dev.ascorrea.com/fullchain.pem;
|
||||||
ssl_certificate_key /etc/nginx/ssl/live/benchcoach.online/privkey.pem;
|
ssl_certificate_key /etc/nginx/ssl/live/benchcoach-dev.ascorrea.com/privkey.pem;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# ...
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header Client-IP $remote_addr;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_pass http://app:3000/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user