Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not see any 'projects' in the projects page with docker compose depoly #212

Closed
littleji opened this issue May 21, 2019 · 15 comments
Closed
Labels
question Further information is requested

Comments

@littleji
Copy link

If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.

System information

  • centos 7.4:
  • docker 18.09.5:

Describe the problem

as the READEME describe, I deployed the doccano use the docker-compose method,after the system started,:

  1. login
  2. click 'projects'
    and I cannt see anything in this page like this

and I open the developer console, a js file cannot find by the system, like this

also I cannot find this js file in the app/server folder, but in the app/server/static

Source code / logs

docker node logs:

Starting webpack

> server@1.0.0 start /src/app/server
> cross-env HOT_RELOAD=1 DEBUG=1 webpack-dev-server

ℹ 「wds」: Project is running at http://0.0.0.0:8080/
ℹ 「wds」: webpack output is served from http://127.0.0.1:8080/
ℹ 「wdm」: wait until bundle finished: /static/js/
ℹ 「wdm」: Hash: 3f63afd2adca1b8d0559
Version: webpack 4.12.0
Time: 4963ms
Built at: 2019-05-21 08:35:39
                          Asset      Size                        Chunks             Chunk Names
                       index.js  1.52 MiB                         index  [emitted]  index
           demo_named_entity.js  1.93 MiB             demo_named_entity  [emitted]  demo_named_entity
            demo_translation.js  1.88 MiB              demo_translation  [emitted]  demo_translation
     document_classification.js  4.19 MiB       document_classification  [emitted]  document_classification
            download_seq2seq.js   4.1 MiB              download_seq2seq  [emitted]  download_seq2seq
  download_sequence_labeling.js  4.09 MiB    download_sequence_labeling  [emitted]  download_sequence_labeling
download_text_classification.js   4.1 MiB  download_text_classification  [emitted]  download_text_classification
                   guideline.js  1.94 MiB                     guideline  [emitted]  guideline
    demo_text_classification.js  1.91 MiB      demo_text_classification  [emitted]  demo_text_classification
                       label.js   1.9 MiB                         label  [emitted]  label
                    projects.js  1.86 MiB                      projects  [emitted]  projects
                     seq2seq.js  4.15 MiB                       seq2seq  [emitted]  seq2seq
           sequence_labeling.js  4.22 MiB             sequence_labeling  [emitted]  sequence_labeling
                       stats.js  4.42 MiB                         stats  [emitted]  stats
              upload_seq2seq.js   4.1 MiB                upload_seq2seq  [emitted]  upload_seq2seq
    upload_sequence_labeling.js   4.1 MiB      upload_sequence_labeling  [emitted]  upload_sequence_labeling
  upload_text_classification.js   4.1 MiB    upload_text_classification  [emitted]  upload_text_classification
Entrypoint index = index.js
Entrypoint sequence_labeling = sequence_labeling.js
Entrypoint document_classification = document_classification.js
Entrypoint seq2seq = seq2seq.js
Entrypoint projects = projects.js
Entrypoint stats = stats.js
Entrypoint label = label.js
Entrypoint guideline = guideline.js
Entrypoint demo_text_classification = demo_text_classification.js
Entrypoint demo_named_entity = demo_named_entity.js
Entrypoint demo_translation = demo_translation.js
Entrypoint upload_seq2seq = upload_seq2seq.js
Entrypoint upload_sequence_labeling = upload_sequence_labeling.js
Entrypoint upload_text_classification = upload_text_classification.js
Entrypoint download_seq2seq = download_seq2seq.js
Entrypoint download_sequence_labeling = download_sequence_labeling.js
Entrypoint download_text_classification = download_text_classification.js
 [1] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/sequence_labeling.js 52 bytes {sequence_labeling} [built]
 [2] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/document_classification.js 52 bytes {document_classification} [built]
 [3] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/seq2seq.js 52 bytes {seq2seq} [built]
 [4] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/projects.js 52 bytes {projects} [built]
 [5] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/stats.js 52 bytes {stats} [built]
 [6] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/label.js 52 bytes {label} [built]
 [7] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/guideline.js 52 bytes {guideline} [built]
 [8] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/demo/demo_text_classification.js 52 bytes {demo_text_classification} [built]
 [9] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/demo/demo_named_entity.js 52 bytes {demo_named_entity} [built]
[10] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/demo/demo_translation.js 52 bytes {demo_translation} [built]
[11] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/upload_seq2seq.js 52 bytes {upload_seq2seq} [built]
[12] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/upload_sequence_labeling.js 52 bytes {upload_sequence_labeling} [built]
[13] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/upload_text_classification.js 52 bytes {upload_text_classification} [built]
[14] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/download_seq2seq.js 52 bytes {download_seq2seq} [built]
[16] multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./static/js/download_text_classification.js 52 bytes {download_text_classification} [built]
    + 567 hidden modules
 「wdm」: Compiled successfully.

python logs:

Installing dependencies
Requirement already satisfied: applicationinsights==0.11.7 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 1)) (0.11.7)
Requirement already satisfied: dj-database-url==0.5.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 2)) (0.5.0)
Requirement already satisfied: Django==2.1.7 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 3)) (2.1.7)
Requirement already satisfied: django-filter==2.0.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 4)) (2.0.0)
Requirement already satisfied: django-heroku==0.3.1 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 5)) (0.3.1)
Requirement already satisfied: django-webpack-loader==0.6.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 6)) (0.6.0)
Requirement already satisfied: django-widget-tweaks==1.4.2 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 7)) (1.4.2)
Requirement already satisfied: django-polymorphic==2.0.3 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 8)) (2.0.3)
Requirement already satisfied: django-rest-polymorphic==0.1.8 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 9)) (0.1.8)
Requirement already satisfied: djangorestframework==3.8.2 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 10)) (3.8.2)
Requirement already satisfied: djangorestframework-csv==2.1.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 11)) (2.1.0)
Requirement already satisfied: djangorestframework-filters==0.10.2 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 12)) (0.10.2)
Requirement already satisfied: environs==4.1.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 13)) (4.1.0)
Requirement already satisfied: djangorestframework-xml==1.4.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 14)) (1.4.0)
Requirement already satisfied: Faker==0.8.8 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 15)) (0.8.8)
Requirement already satisfied: flake8==3.6.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 16)) (3.6.0)
Requirement already satisfied: furl==2.0.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 17)) (2.0.0)
Requirement already satisfied: gunicorn==19.9.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 18)) (19.9.0)
Requirement already satisfied: mixer==6.1.3 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 19)) (6.1.3)
Requirement already satisfied: model-mommy==1.6.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 20)) (1.6.0)
Requirement already satisfied: psycopg2-binary==2.7.7 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 21)) (2.7.7)
Requirement already satisfied: python-dateutil==2.7.3 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 22)) (2.7.3)
Requirement already satisfied: pytz==2018.4 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 23)) (2018.4)
Requirement already satisfied: six==1.11.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 24)) (1.11.0)
Requirement already satisfied: seqeval==0.0.6 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 25)) (0.0.6)
Requirement already satisfied: social-auth-app-django==3.1.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 26)) (3.1.0)
Requirement already satisfied: social-auth-core[azuread]==3.0.0 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 27)) (3.0.0)
Requirement already satisfied: text-unidecode==1.2 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 28)) (1.2)
Requirement already satisfied: tornado==5.0.2 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 29)) (5.0.2)
Requirement already satisfied: unittest-xml-reporting==2.5.1 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 30)) (2.5.1)
Requirement already satisfied: whitenoise[brotli]==4.1.2 in /src/venv/lib/python3.6/site-packages (from -r /src/tools/../requirements.txt (line 31)) (4.1.2)
Requirement already satisfied: psycopg2 in /src/venv/lib/python3.6/site-packages (from django-heroku==0.3.1->-r /src/tools/../requirements.txt (line 5)) (2.8.2)
Requirement already satisfied: unicodecsv in /src/venv/lib/python3.6/site-packages (from djangorestframework-csv==2.1.0->-r /src/tools/../requirements.txt (line 11)) (0.14.1)
Requirement already satisfied: marshmallow>=2.7.0 in /src/venv/lib/python3.6/site-packages (from environs==4.1.0->-r /src/tools/../requirements.txt (line 13)) (2.19.2)
Requirement already satisfied: python-dotenv in /src/venv/lib/python3.6/site-packages (from environs==4.1.0->-r /src/tools/../requirements.txt (line 13)) (0.10.2)
Requirement already satisfied: defusedxml>=0.3 in /src/venv/lib/python3.6/site-packages (from djangorestframework-xml==1.4.0->-r /src/tools/../requirements.txt (line 14)) (0.6.0)
Requirement already satisfied: pycodestyle<2.5.0,>=2.4.0 in /src/venv/lib/python3.6/site-packages (from flake8==3.6.0->-r /src/tools/../requirements.txt (line 16)) (2.4.0)
Requirement already satisfied: setuptools>=30 in /src/venv/lib/python3.6/site-packages (from flake8==3.6.0->-r /src/tools/../requirements.txt (line 16)) (41.0.1)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /src/venv/lib/python3.6/site-packages (from flake8==3.6.0->-r /src/tools/../requirements.txt (line 16)) (0.6.1)
Requirement already satisfied: pyflakes<2.1.0,>=2.0.0 in /src/venv/lib/python3.6/site-packages (from flake8==3.6.0->-r /src/tools/../requirements.txt (line 16)) (2.0.0)
Requirement already satisfied: orderedmultidict>=1.0 in /src/venv/lib/python3.6/site-packages (from furl==2.0.0->-r /src/tools/../requirements.txt (line 17)) (1.0)
Requirement already satisfied: numpy>=1.14.0 in /src/venv/lib/python3.6/site-packages (from seqeval==0.0.6->-r /src/tools/../requirements.txt (line 25)) (1.16.3)
Requirement already satisfied: requests-oauthlib>=0.6.1 in /src/venv/lib/python3.6/site-packages (from social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (1.2.0)
Requirement already satisfied: PyJWT>=1.4.0 in /src/venv/lib/python3.6/site-packages (from social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (1.7.1)
Requirement already satisfied: python3-openid>=3.0.10; python_version >= "3.0" in /src/venv/lib/python3.6/site-packages (from social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (3.1.0)
Requirement already satisfied: oauthlib>=1.0.3 in /src/venv/lib/python3.6/site-packages (from social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (3.0.1)
Requirement already satisfied: requests>=2.9.1 in /src/venv/lib/python3.6/site-packages (from social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (2.22.0)
Requirement already satisfied: cryptography>=2.1.1; extra == "azuread" in /src/venv/lib/python3.6/site-packages (from social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (2.6.1)
Requirement already satisfied: Brotli; extra == "brotli" in /src/venv/lib/python3.6/site-packages (from whitenoise[brotli]==4.1.2->-r /src/tools/../requirements.txt (line 31)) (1.0.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /src/venv/lib/python3.6/site-packages (from requests>=2.9.1->social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /src/venv/lib/python3.6/site-packages (from requests>=2.9.1->social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (1.25.2)
Requirement already satisfied: certifi>=2017.4.17 in /src/venv/lib/python3.6/site-packages (from requests>=2.9.1->social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (2019.3.9)
Requirement already satisfied: idna<2.9,>=2.5 in /src/venv/lib/python3.6/site-packages (from requests>=2.9.1->social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (2.8)
Requirement already satisfied: asn1crypto>=0.21.0 in /src/venv/lib/python3.6/site-packages (from cryptography>=2.1.1; extra == "azuread"->social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (0.24.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in /src/venv/lib/python3.6/site-packages (from cryptography>=2.1.1; extra == "azuread"->social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (1.12.3)
Requirement already satisfied: pycparser in /src/venv/lib/python3.6/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.1.1; extra == "azuread"->social-auth-core[azuread]==3.0.0->-r /src/tools/../requirements.txt (line 27)) (2.19)
Initializing database
Database unavailable on attempt 1/60: could not connect to server: Connection refused
        Is the server running on host "postgres" (172.22.0.2) and accepting
        TCP/IP connections on port 5432?
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, server, sessions, social_django
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying server.0001_initial... OK
  Applying sessions.0001_initial... OK
  Applying social_django.0001_initial... OK
  Applying social_django.0002_add_related_name... OK
  Applying social_django.0003_alter_email_max_length... OK
  Applying social_django.0004_auto_20160423_0400... OK
  Applying social_django.0005_auto_20160727_2333... OK
  Applying social_django.0006_partial... OK
  Applying social_django.0007_code_timestamp... OK
  Applying social_django.0008_partial_timestamp... OK
Superuser created successfully.
Starting django
[21/May/2019 08:35:53] "GET / HTTP/1.1" 200 11489
[21/May/2019 08:35:53] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:35:53] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:35:53] "GET /static/images/named_entity_recognition.png HTTP/1.1" 304 0
[21/May/2019 08:35:53] "GET /static/images/sentiment_analysis.png HTTP/1.1" 304 0
[21/May/2019 08:35:53] "GET /static/images/translation.png HTTP/1.1" 304 0
[21/May/2019 08:35:57] "GET /login/ HTTP/1.1" 200 6069
[21/May/2019 08:35:57] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:35:57] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:35:59] "POST /login/ HTTP/1.1" 302 0
[21/May/2019 08:35:59] "GET /projects/ HTTP/1.1" 200 3766
[21/May/2019 08:35:59] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:35:59] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:36:02] "GET /projects/ HTTP/1.1" 200 3766
[21/May/2019 08:36:02] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:36:02] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:36:05] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:36:07] "GET /projects/ HTTP/1.1" 200 3766
[21/May/2019 08:36:07] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:36:07] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:36:08] "GET /static/images/favicons/favicon-32x32.png HTTP/1.1" 200 2379
[21/May/2019 08:38:09] "GET / HTTP/1.1" 200 10860
[21/May/2019 08:38:09] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:38:09] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:38:09] "GET /static/images/named_entity_recognition.png HTTP/1.1" 304 0
[21/May/2019 08:38:09] "GET /static/images/translation.png HTTP/1.1" 304 0
[21/May/2019 08:38:09] "GET /static/images/sentiment_analysis.png HTTP/1.1" 304 0
[21/May/2019 08:38:12] "GET /projects/ HTTP/1.1" 200 3766
[21/May/2019 08:38:12] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:38:12] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:38:36] "GET /projects/ HTTP/1.1" 200 3766
[21/May/2019 08:38:36] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:38:36] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:38:37] "GET /static/images/favicons/favicon-32x32.png HTTP/1.1" 200 2379
[21/May/2019 08:44:17] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:44:19] "GET /projects/ HTTP/1.1" 200 3766
[21/May/2019 08:44:19] "GET /static/css/forum.css HTTP/1.1" 304 0
[21/May/2019 08:44:19] "GET /static/images/logo.png HTTP/1.1" 304 0
[21/May/2019 08:44:20] "GET /static/images/favicons/favicon-32x32.png HTTP/1.1" 200 2379
@c-w
Copy link
Member

c-w commented May 21, 2019

This is strange since from the logs it seems like everything is working fine.

I tested the docker-compose setup with WSL+Ubuntu-16.04 (docker-compose 1.24.0 and docker 18.06.1-ce) as well as a real install of Ubuntu-18.04 (docker-compose 1.21.2 and docker 18.09.6) and everything works fine. Perhaps there's something different about CentOS.

A couple of avenues to investigate:

  • What's the version of docker-compose on your system?
  • Can you access http://127.0.0.1:8080 in your browser?

@littleji
Copy link
Author

littleji commented May 21, 2019

@c-w thanks for attention, and the version of docker-compose is docker-compose version 1.24.0, build 0aa59064
and the http://127.0.0.1:8080 like this

by the way, I can see the projects.js in static/js like:
image

@icoxfog417 icoxfog417 added the question Further information is requested label May 22, 2019
@c-w
Copy link
Member

c-w commented May 22, 2019

@littleji I'm unable to reproduce the behavior you reported on a fresh CentOS 7.5 install so there may something peculiar about your machine. Could you please confirm that the steps below look representative of your setup?

Step 1: Create a new CentOS VM on Azure

# create a new virtual  machine
$ az group create -n {SOME_GROUP_NAME} -l eastus
$ az vm create -n {SOME_VM_NAME} -g {SOME_GROUP_NAME} --image Centos

# open ports for doccano docker-compose deployment
$ az vm open-port -n {SOME_VM_NAME} -g {SOME_GROUP_NAME} --priority 100 --port 22
$ az vm open-port -n {SOME_VM_NAME} -g {SOME_GROUP_NAME} --priority 101 --port 8000
$ az vm open-port -n {SOME_VM_NAME} -g {SOME_GROUP_NAME} --priority 102 --port 8080

Step 2: Connect to the VM

$ az vm list-ip-addresses -n {SOME_VM_NAME} -g {SOME_GROUP_NAME} -o table
$ ssh {INSERT_IP_OF_VM_HERE}
>>> cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)

Step 3: Setup Docker (guide)

>>> sudo docker version
Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77156
 Built:             Sat May  4 02:34:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 02:02:43 2019
  OS/Arch:          linux/amd64
  Experimental:     false

>>> sudo docker-compose version
docker-compose version 1.24.0, build 0aa5906
docker-py version: 3.7.2
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.2k-fips  26 Jan 2017

Step 4: Setup doccano

# fetch code
>>> curl -LfsSO https://github.com/chakki-works/doccano/archive/ad01f527a2128a18149bef30edbc1f1f1f3a887c.zip 
>>> unzip ad01f527a2128a18149bef30edbc1f1f1f3a887c.zip
>>> cd doccano-ad01f527a2128a18149bef30edbc1f1f1f3a887c

# ensure webpack output can be accessed remotely
>>> sed -i 's@`http://127.0.0.1:@`http://{INSERT_IP_OF_VM_HERE}:@g' app/server/webpack.config.js

# run doccano
>>> sudo docker-compose pull
>>> sudo docker-compose up

Step 5: Access projects page

Go to http://{INSERT_IP_OF_VM_HERE}:8000/projects/ and log in with admin:password.

@BurakaKrishna
Copy link

I am having the same issue, when i did a fresh install. Everything was working fine before but now i got the same error as mentioned in the above. project call is happening on port ip:8000 and projects.js call is happening on localhost:8080.
@littleji where you able to solve that ?

@littleji
Copy link
Author

littleji commented Jun 13, 2019

I am having the same issue, when i did a fresh install. Everything was working fine before but now i got the same error as mentioned in the above. project call is happening on port ip:8000 and projects.js call is happening on localhost:8080.
@littleji where you able to solve that ?

@BurakaKrishna
sorry to say I still suffer this issue, I have already went back and use the older version, this is the docker compose file

version: '3'
services:
  doccano:
    image:  chakkiworks/doccano
    container_name: doccano
    hostname: doccano
    restart: always
    ports:
      - "18080:8080"
      - "10080:80"
    networks:
      - dev
networks:
  dev:
    driver: bridge
    ipam:
      driver: default

@c-w
Copy link
Member

c-w commented Jun 13, 2019

That docker-compose file doesn't look like the one in the repo. Any particular reason why you're not using or adapting the docker-compose file in the repo?

@BurakaKrishna
Copy link

I have used the docker image to deploy and did a fresh install, couldn't solve using doccano compose.

@rikukissa
Copy link

Is the intention to keep on using Webpack dev server in production? 10 minutes of debugging this led me to believe the root cause of this is that the bundle needs to be referred with a full url, as the webpack server runs on another port.

Best way to fix this would probably be to build the assets before the web server starts / release with assets already build. First aid for this specific issue could also be to assign a new Django route that proxies requests to the webpack dev server. After this the web browser wouldn't have to specifically know where the dev server is located and you could refer javascript assets with relative paths.

@c-w
Copy link
Member

c-w commented Jun 28, 2019

@rikukissa As mentioned in the readme, the docker-compose file included in this repository is intended for development purposes. For production usage, please use the Docker image which does not use webpack at runtime.

@shizacat
Copy link

Hello,
may be change host value "127.0.0.1" to variable ${webpackHost}. Thus, it will allow to set the external address.
https://github.com/chakki-works/doccano/blob/master/app/server/static/webpack.config.js#L28

And into docker-compose setup WEBPACK_HOST: "10.211.55.161" as external address.

@krishkumar
Copy link

I am facing the same issue. Is there a workaround for this?

@c-w
Copy link
Member

c-w commented Jul 29, 2019

I have not yet seen a way to reproduce this unfortunately. If someone can share the exact steps that lead to the error in a way that I can reproduce it, I can look into investigating this more.

@krishkumar
Copy link

krishkumar commented Aug 3, 2019

Yeah typically this problem arises during upgrades on existing installations. Its so easy to miss building the server pages with the npm build commands.

@c-w
Copy link
Member

c-w commented Aug 3, 2019

We're currently caching node_modules and the python virtualenv in the docker-compose file to speed up the development loop. This means that if any of the project's dependencies changed, a clean stop via docker-compose down --volumes is required.

The docker-compose file is intended as a development tool only, not as a production deployment mechanism. For production deployment, I'd recommend to use the official Docker build.

@icoxfog417
Copy link
Contributor

The topic is drifted to another issue. Please raise a new issue if you want to improve deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants