From 1013b5cdca342623870f80e05a7d26f0d65b1899 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 6 Nov 2021 22:18:38 +0100 Subject: [PATCH] Docker - update fittrackee-client --- .env.docker | 2 + Makefile | 2 +- docker-compose-dev.yml | 2 +- docs/_sources/installation.rst.txt | 88 ++++++---------------- docs/genindex.html | 14 +--- docs/installation.html | 116 ++++++----------------------- docs/objects.inv | Bin 1275 -> 1208 bytes docs/searchindex.js | 2 +- docsrc/source/installation.rst | 88 ++++++---------------- fittrackee_client/.env | 3 +- fittrackee_client/Dockerfile | 24 ++++++ 11 files changed, 100 insertions(+), 241 deletions(-) create mode 100644 fittrackee_client/Dockerfile diff --git a/.env.docker b/.env.docker index 53314858..31797309 100644 --- a/.env.docker +++ b/.env.docker @@ -16,6 +16,8 @@ export DATABASE_TEST_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/f # Emails export UI_URL=http://0.0.0.0:5000 +# For development: +# export UI_URL=http://0.0.0.0:3000 export EMAIL_URL=smtp://none:none@mail:1025 export SENDER_EMAIL=fittrackee@example.com export REDIS_URL=redis://redis:6379 diff --git a/Makefile b/Makefile index 35f7f46d..03e8b22a 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ docker-run-workers: docker-serve-client: docker-compose -f docker-compose-dev.yml up -d fittrackee_client - docker-compose -f docker-compose-dev.yml exec fittrackee_client react-scripts start + docker-compose -f docker-compose-dev.yml exec fittrackee_client yarn serve docker-shell: docker-compose -f docker-compose-dev.yml exec fittrackee docker/shell.sh diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index e6811b90..41478763 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -37,7 +37,7 @@ services: container_name: fittrackee_client environment: - NODE_ENV=development - - REACT_APP_API_URL=http://localhost:5000 + - VUE_APP_API_URL=http://localhost:5000 build: context: ./fittrackee_client volumes: diff --git a/docs/_sources/installation.rst.txt b/docs/_sources/installation.rst.txt index 156409eb..7bcaf986 100644 --- a/docs/_sources/installation.rst.txt +++ b/docs/_sources/installation.rst.txt @@ -191,62 +191,12 @@ deployment method. **Dark Sky** API key for weather data (not mandatory). -.. envvar:: REACT_APP_API_URL +.. envvar:: VUE_APP_API_URL **FitTrackee** API URL, only needed in dev environment. -Deprecated variables -^^^^^^^^^^^^^^^^^^^^ - -.. envvar:: REACT_APP_GPX_LIMIT_IMPORT - - .. deprecated:: 0.3.0 now stored in database - - Maximum number of gpx file in zip archive. - - :default: 10 - - -.. envvar:: REACT_APP_MAX_SINGLE_FILE_SIZE - - .. deprecated:: 0.3.0 now stored in database - - Maximum size of a gpx or picture file. - - :default: 1MB - - -.. envvar:: REACT_APP_MAX_ZIP_FILE_SIZE - - .. deprecated:: 0.3.0 now stored in database - - Maximum size of a zip archive. - - :default: 10MB - - -.. envvar:: REACT_APP_ALLOW_REGISTRATION - - .. deprecated:: 0.3.0 now stored in database - - Allows users to register. - - :default: true - - -.. envvar:: REACT_APP_THUNDERFOREST_API_KEY - - .. deprecated:: 0.4.0 see `TILE_SERVER_URL `__ - - ThunderForest API key. - -.. warning:: - | Since FitTrackee 0.3.0, some applications parameters are now stored in database. - | Related environment variables are needed to initialize database when upgrading from version prior 0.3.0. - - Emails ^^^^^^ .. versionadded:: 0.3.0 @@ -409,7 +359,7 @@ Dev environment - Create **.env** from example and update it (see `Environment variables `__). -- Install Python virtualenv, React and all related packages and +- Install Python virtualenv, Vue and all related packages and initialize the database: .. code:: bash @@ -439,13 +389,13 @@ Production environment .. warning:: | Note that FitTrackee is under heavy development, some features may be unstable. -- Download the last release (for now, it is the release v0.4.9): +- Download the last release (for now, it is the release v0.5.0): .. code:: bash - $ wget https://github.com/SamR1/FitTrackee/archive/v0.4.9.tar.gz - $ tar -xzf v0.4.9.tar.gz - $ mv FitTrackee-0.4.9 FitTrackee + $ wget https://github.com/SamR1/FitTrackee/archive/v0.5.0.tar.gz + $ tar -xzf v0.5.0.tar.gz + $ mv FitTrackee-0.5.0 FitTrackee $ cd FitTrackee - Create **.env** from example and update it @@ -520,13 +470,13 @@ Prod environment - Change to the directory where FitTrackee directory is located -- Download the last release (for now, it is the release v0.4.9) and overwrite existing files: +- Download the last release (for now, it is the release v0.5.0) and overwrite existing files: .. code:: bash - $ wget https://github.com/SamR1/FitTrackee/archive/v0.4.9.tar.gz - $ tar -xzf v0.4.9.tar.gz - $ cp -R FitTrackee-0.4.9/* FitTrackee/ + $ wget https://github.com/SamR1/FitTrackee/archive/v0.5.0.tar.gz + $ tar -xzf v0.5.0.tar.gz + $ cp -R FitTrackee-0.5.0/* FitTrackee/ $ cd FitTrackee - Update **.env** if needed (see `Environment variables `__). @@ -704,19 +654,25 @@ Open http://localhost:8025 to access `MailHog interface MAP_ATTRIBUTION
  • PORT -
  • -
  • REACT_APP_ALLOW_REGISTRATION -
  • -
  • REACT_APP_API_URL -
  • -
  • REACT_APP_GPX_LIMIT_IMPORT -
  • -
  • REACT_APP_MAX_SINGLE_FILE_SIZE -
  • -
  • REACT_APP_MAX_ZIP_FILE_SIZE -
  • -
  • REACT_APP_THUNDERFOREST_API_KEY
  • REDIS_URL
  • @@ -166,6 +154,8 @@
  • UI_URL
  • UPLOAD_FOLDER +
  • +
  • VUE_APP_API_URL
  • WEATHER_API_KEY
  • diff --git a/docs/installation.html b/docs/installation.html index 3533c417..fa5ae5e5 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -80,7 +80,6 @@
  • Installation @@ -439,86 +438,11 @@ see -
    -REACT_APP_API_URL
    +
    +VUE_APP_API_URL

    FitTrackee API URL, only needed in dev environment.

    -
    -

    Deprecated variables

    -
    -
    -REACT_APP_GPX_LIMIT_IMPORT
    -
    -

    Deprecated since version 0.3.0: now stored in database

    -
    -

    Maximum number of gpx file in zip archive.

    -
    -
    Default
    -

    10

    -
    -
    -
    - -
    -
    -REACT_APP_MAX_SINGLE_FILE_SIZE
    -
    -

    Deprecated since version 0.3.0: now stored in database

    -
    -

    Maximum size of a gpx or picture file.

    -
    -
    Default
    -

    1MB

    -
    -
    -
    - -
    -
    -REACT_APP_MAX_ZIP_FILE_SIZE
    -
    -

    Deprecated since version 0.3.0: now stored in database

    -
    -

    Maximum size of a zip archive.

    -
    -
    Default
    -

    10MB

    -
    -
    -
    - -
    -
    -REACT_APP_ALLOW_REGISTRATION
    -
    -

    Deprecated since version 0.3.0: now stored in database

    -
    -

    Allows users to register.

    -
    -
    Default
    -

    true

    -
    -
    -
    - -
    -
    -REACT_APP_THUNDERFOREST_API_KEY
    -
    -

    Deprecated since version 0.4.0: see TILE_SERVER_URL

    -
    -

    ThunderForest API key.

    -
    - -
    -

    Warning

    -
    -
    Since FitTrackee 0.3.0, some applications parameters are now stored in database.
    -
    Related environment variables are needed to initialize database when upgrading from version prior 0.3.0.
    -
    -
    -

    Emails

    @@ -689,7 +613,7 @@ $ cd FitTrackee
    • Create .env from example and update it (see Environment variables).

    • -
    • Install Python virtualenv, React and all related packages and +

    • Install Python virtualenv, Vue and all related packages and initialize the database:

    $ make install-dev
    @@ -720,11 +644,11 @@ and the password mp
     
      -
    • Download the last release (for now, it is the release v0.4.9):

    • +
    • Download the last release (for now, it is the release v0.5.0):

    -
    $ wget https://github.com/SamR1/FitTrackee/archive/v0.4.9.tar.gz
    -$ tar -xzf v0.4.9.tar.gz
    -$ mv FitTrackee-0.4.9 FitTrackee
    +
    $ wget https://github.com/SamR1/FitTrackee/archive/v0.5.0.tar.gz
    +$ tar -xzf v0.5.0.tar.gz
    +$ mv FitTrackee-0.5.0 FitTrackee
     $ cd FitTrackee
     
    @@ -798,11 +722,11 @@ $ make upgrade-db
    • Stop the application

    • Change to the directory where FitTrackee directory is located

    • -
    • Download the last release (for now, it is the release v0.4.9) and overwrite existing files:

    • +
    • Download the last release (for now, it is the release v0.5.0) and overwrite existing files:

    -
    $ wget https://github.com/SamR1/FitTrackee/archive/v0.4.9.tar.gz
    -$ tar -xzf v0.4.9.tar.gz
    -$ cp -R FitTrackee-0.4.9/* FitTrackee/
    +
    $ wget https://github.com/SamR1/FitTrackee/archive/v0.5.0.tar.gz
    +$ tar -xzf v0.5.0.tar.gz
    +$ cp -R FitTrackee-0.5.0/* FitTrackee/
     $ cd FitTrackee
     
    @@ -976,23 +900,29 @@ $ make docker-build docker-run docker-init
    -
    -

    Client Development

    +
    +

    Development

    -

    New in version 0.4.10.

    +

    New in version 0.5.0.

      -
    • in order to start client with React dev tools, install fittrackee_client

    • +
    • an additional step is to install fittrackee_client

    $ make docker-build-client
     
      -
    • start React app

    • +
    • to start FitTrackee with client dev tools:

    $ make docker-serve-client
     
    +

    Open http://localhost:3000 and log in (the email is admin@example.com +and the password mpwoadmin) or register

    +
    +

    Note

    +

    Some environment variables need to be updated like UI_URL

    +
    diff --git a/docs/objects.inv b/docs/objects.inv index dabd8caf2469383ab4936f2f95c102ebe03d7c5f..53b4db98d07a6532043ef45669f2d21ed52a1159 100644 GIT binary patch delta 1093 zcmV-L1iJhC3AhQ6f`6+v6vy{G1vBl!Ug$F2W=9fy!-NC|@Xd6^C`Q4|#Xv#aCVhau zLDzl7KEgdh!WM!g$m8k49&~j6zjO30S-8$E+|j*NR9Rk{drIr8x@xKUn>kc{+0#Su z3o{}FHpFa*yCcJr0aZsiAtO@&*v5M1Edy%YwtrSlYBi(<-+zYu(UF!ePifGjv3@p0 zSErbgGuT2ng62EgH3F8BfZlNyT~)s1nc5_7?HWw;s#Mx06f^o7)7}1kLSH?{sPj@QgWg|g8?uAB z)2eb|R)mAI(0{gd)zFEQTNR~n9SN;fUec@nJIT|v1_v=EIw?QL%3Ujir9S-_O)(>P zEoqVxAIREzeoK0eM|_$e$l3T_Jfh>GSWaWkLe037QSOb3k~_*O zxkWRZkOYx;q24UF=M(0FtTbryRFQbnOj%AG@0*%=s(*VZZ1UgXV44iYU{`oY_gT5L z*Nye3{q8-0wQ6YtTga6#B<+5*)<#1-hRdTo)F6RFQ=Det#a(i_kn&_v`tdYhE*aL^ z?J<18NslkqXe2SuNyKVNb|57cJ1;L>bXcSek>HDsS_-y2^{jrqT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__ - - ThunderForest API key. - -.. warning:: - | Since FitTrackee 0.3.0, some applications parameters are now stored in database. - | Related environment variables are needed to initialize database when upgrading from version prior 0.3.0. - - Emails ^^^^^^ .. versionadded:: 0.3.0 @@ -409,7 +359,7 @@ Dev environment - Create **.env** from example and update it (see `Environment variables `__). -- Install Python virtualenv, React and all related packages and +- Install Python virtualenv, Vue and all related packages and initialize the database: .. code:: bash @@ -439,13 +389,13 @@ Production environment .. warning:: | Note that FitTrackee is under heavy development, some features may be unstable. -- Download the last release (for now, it is the release v0.4.9): +- Download the last release (for now, it is the release v0.5.0): .. code:: bash - $ wget https://github.com/SamR1/FitTrackee/archive/v0.4.9.tar.gz - $ tar -xzf v0.4.9.tar.gz - $ mv FitTrackee-0.4.9 FitTrackee + $ wget https://github.com/SamR1/FitTrackee/archive/v0.5.0.tar.gz + $ tar -xzf v0.5.0.tar.gz + $ mv FitTrackee-0.5.0 FitTrackee $ cd FitTrackee - Create **.env** from example and update it @@ -520,13 +470,13 @@ Prod environment - Change to the directory where FitTrackee directory is located -- Download the last release (for now, it is the release v0.4.9) and overwrite existing files: +- Download the last release (for now, it is the release v0.5.0) and overwrite existing files: .. code:: bash - $ wget https://github.com/SamR1/FitTrackee/archive/v0.4.9.tar.gz - $ tar -xzf v0.4.9.tar.gz - $ cp -R FitTrackee-0.4.9/* FitTrackee/ + $ wget https://github.com/SamR1/FitTrackee/archive/v0.5.0.tar.gz + $ tar -xzf v0.5.0.tar.gz + $ cp -R FitTrackee-0.5.0/* FitTrackee/ $ cd FitTrackee - Update **.env** if needed (see `Environment variables `__). @@ -704,19 +654,25 @@ Open http://localhost:8025 to access `MailHog interface