Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Khalid Ali
schedules
Commits
5896bd8a
Commit
5896bd8a
authored
Sep 04, 2018
by
Zac Wood
Browse files
Added SECRET_KEY_BASE to Dockerfile
Web now sends requests to hostname/api instead of a hard coded URL
parent
d829c629
Changes
2
Hide whitespace changes
Inline
Side-by-side
schedules_api/Dockerfile
View file @
5896bd8a
...
...
@@ -9,5 +9,6 @@ EXPOSE 3000
ENV
RAILS_ENV production
RUN
bundle
install
RUN
export
SECRET_KEY_BASE
=
$(
rails secret
)
RUN
rails db:migrate
RUN
rails db:seed
schedules_web/src/util/ApiService.ts
View file @
5896bd8a
...
...
@@ -24,7 +24,7 @@ const postJson = (endpoint: string, data: any): Promise<Response> =>
});
const
local
=
'
localhost:3000/api
'
;
const
remote
=
'
schedules.zacwood.
me/api
'
;
const
remote
=
`
${
window
.
location
.
hostna
me
}
/api
`
const
apiUrl
=
process
.
env
.
NODE_ENV
===
'
development
'
?
`http://
${
local
}
`
:
`https://
${
remote
}
`
;
const
webcalUrl
=
process
.
env
.
NODE_ENV
===
'
development
'
?
`webcal://
${
local
}
`
:
`webcal://
${
remote
}
`
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment