Skip to content

Commit 8bd323a

Browse files
authored
Merge pull request #108 from plural/server-syncup
Sync up API preview server changes.
2 parents 6e1bd90 + f958e22 commit 8bd323a

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

config/environments/development.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@
6161

6262
# Uncomment if you wish to allow Action Cable access from any origin.
6363
# config.action_cable.disable_request_forgery_protection = true
64+
config.hosts << "api-preview.netrunnerdb.com"
6465
end

config/initializers/cors.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Read more: https://github.com/cyu/rack-cors
77

8-
Rails.application.config.middleware.insert_before 0, Rack::Cors do
8+
Rails.application.config.middleware.insert_after ActionDispatch::Static, Rack::Cors, debug: true, :logger => Rails.logger do
99
allow do
1010
origins "*"
1111

docker-compose.override.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@ version: "3.2"
33
services:
44
# service configuration for our dockerized Rails app
55
app:
6+
environment:
7+
VIRTUAL_HOST: api-preview.netrunnerdb.com
8+
VIRTUAL_PORT: 3000
9+
LETSENCRYPT_HOST: api-preview.netrunnerdb.com
10+
LETSENCRYPT_EMAIL: [email protected]
611
ports:
712
- "3000:3000"

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: "3.2"
33
services:
44
# service configuration for our dockerized Rails app
55
app:
6+
network_mode: bridge
67

78
# use the Dockerfile next to this file
89
build: .
@@ -26,6 +27,7 @@ services:
2627

2728
# service configuration for our database
2829
db:
30+
network_mode: bridge
2931
image: postgres:14.1
3032

3133
environment:

0 commit comments

Comments
 (0)