You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the new Nitro 5 init menus, it auto detects the folder I'm in. This shows up both when determining the libraryName as well as when running apex-nitro launch:
(see all references to /data/)
APEX Nitro
is building /data/src ...
=> bundling files
./src/main.js → ./build/demo.js...
created ./build/demo.js in 3.9s
./src/main.js → ./build/demo.min.js...
created ./build/demo.min.js in 5.4s
...Done!
...Now launching!
Open up your favorite code editor to /data/src
Any change you make is synchronized to your APEX app in real time.
At first glance there isn't anything wrong with this, however when running in a Docker context (#231), the Docker container can "only see itself" and is unaware of what the host machine (i.e. laptop) current directory is.
To people that use Docker a lot this isn't too confusing but can get people that may not realized that, in my example, /Users/giffy/OneDrive/Documents/GitHub/oraopensource/apex-nitro/docker/test-proj is really being mapped to /data on the Docker container.
To get around this issue I propose the following: Have an environmental variable (lets say APEX_NITRO_PWD_PATH) If this is has a value, use its value rather than pwd on the current system for any "vanity" functions (i.e. display messages but not hard reference points). When running Docker (via setting the alias) we'll run it as:
alias apex-nitro="docker run -it --rm \ -e APEX_NITRO_PWD_PATH=`pwd`\ -v `pwd`:/data \ -p 4000:4000 \ oraopensource/apex-nitro:latest"
Given that we'll provide the alias for users to run they won't have to think about this additional env variable. If it's missing the worst that will happen is that apex-nitro will reference its local pwd path.
The text was updated successfully, but these errors were encountered:
martindsouza
changed the title
Option to use env variable for current directory (pwd)
Option to use env variable for current directory (pwd) in messages
Dec 12, 2019
In the new Nitro 5 init menus, it auto detects the folder I'm in. This shows up both when determining the
libraryName
as well as when runningapex-nitro launch
:(see all references to
/data/
)At first glance there isn't anything wrong with this, however when running in a Docker context (#231), the Docker container can "only see itself" and is unaware of what the host machine (i.e. laptop) current directory is.
To people that use Docker a lot this isn't too confusing but can get people that may not realized that, in my example,
/Users/giffy/OneDrive/Documents/GitHub/oraopensource/apex-nitro/docker/test-proj
is really being mapped to/data
on the Docker container.To get around this issue I propose the following: Have an environmental variable (lets say
APEX_NITRO_PWD_PATH
) If this is has a value, use its value rather thanpwd
on the current system for any "vanity" functions (i.e. display messages but not hard reference points). When running Docker (via setting the alias) we'll run it as:Given that we'll provide the alias for users to run they won't have to think about this additional env variable. If it's missing the worst that will happen is that
apex-nitro
will reference its localpwd
path.The text was updated successfully, but these errors were encountered: