Я развертываю приложение Da sh на Shinyproxy, используя информацию из этих сообщений:
https://support.openanalytics.eu/t/what-is-the-best-way-of-delivering-static-assets-to-the-client-for-custom-apps/363
https://lukesingham.com/how-to-deploy-plotlys-dash-using-shinyproxy/
Тем не менее, я получаю некоторые ошибки при доставке активов c:
![enter image description here](https://i.stack.imgur.com/oKiYZ.png)
Когда Я запускаю приложение da sh в docker контейнере, все в порядке. На сайте нет ошибок, и активы stati c доставлены.
Мои файлы:
app.py
import dash
import dash_core_components as dcc
import dash_html_components as html
external_stylesheets = ['my-style.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div(children=[
html.H1(children='Hello Dash'),
html.Div(children='''
Dash: A web application framework for Python.
'''),
html.Img(src='/assets/logo2.png'),
dcc.Graph(
id='example-graph',
figure={
'data': [
{'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'},
{'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'},
],
'layout': {
'title': 'Dash Data Visualization'
}
}
)
])
app.config.suppress_callback_exceptions = True
app.config.update({
'routes_pathname_prefix': ''
, 'requests_pathname_prefix': ''
})
if __name__ == '__main__':
app.run_server(host='0.0.0.0', port=8050, debug=True)
application.yml
port: 8080
authentication: simple
admin-groups: admins
users:
- name: admin
password: admin
groups: admins
docker:
url: http://localhost:2375
specs:
- id: DashTest
display-name: Dash Demo Application
container-cmd: ["python", "app.py"]
container-image: shiny-dash-app
port: 8050
access-groups: admins
logging:
file:
shinyproxy.log
РЕДАКТИРОВАТЬ: Моя структура кода выглядит так:
dash
├── dash_shinyproxy
| ├── dashapp_shinyproxy
| ├── Dockerfile
| ├── app
| ├── assets
| ├── app.py
Может ли кто-нибудь помочь мне с этой проблемой? Кто-нибудь порекомендовал идеи о том, как файлы stati c должны быть предоставлены дляinyproxy?
Заранее спасибо.