Cannot have view of development

Hello guys,
I have set AUTH_DEVELOPMENT_MODE=true (Azure), but getting the following error when access to /auth/dev: open auth/assets/templates/scenarios.yaml: no such file or directory

Please help to solve, thank you all very much

Hi @annguyen281

Can you describe what are you trying to do?
What kind of environment are you working in (did you cloned the source or using a docker container)?

chers

Hello @darh ,

Thanks for your message
We’re using docker-compose and deploy corteza server to Azure Web App service:

> version: '3.5'
> 
> services:        
>   server:
>     image: cortezaproject/corteza:2021.9
>     restart: always
>     ports:
>       - 80
>     volumes:
>       - /data
>       - ${WEBAPP_STORAGE_HOME}/assets:/data

We’ve already set 2 env. variables:
AUTH_DEVELOPMENT_MODE=true
AUTH_ASSETS_PATH=/data

Hi,

Ok. But why setting auth dev mode to true on a production (my assumption here) env?
What would you like to achieve? Modify the login pages?

You’ll need to extract/unpack the files from the binary into a local drive and modify them there before starting the server.
https://docs.cortezaproject.org/corteza-docs/2021.9/integrator-guide/personalization/auth.html#_enable_personalization

I would recommend you do this on your local development env and modify the (auth template and css) files there. When you’re happy with the changes, move the files to production env and set ONLY the AUTH_ASSETS_PATH to that it points to location where the files are.

Hope this makes sense.
See the docs (link above) for more details.

Hi @darh I have followed the documentation and inserted the AUTH_DEVELOPMENT_MODE=true and AUTH_ASSETS_PATH=/corteza/auth-assets on a line in the .env in my corteza dir

I then restarted docker-compose and tried running the command of corteza-server auth assets export /opt/deploy/corteza/auth-assets but it keeps telling me command not found, how do i export these as described in the documentation?

server:
    image: cortezaproject/corteza:${VERSION}

You wrote that you “restarted” docker-compose.
Did you do docker-compose restart server or docker-compose up -d server?

These two commands treat changes in .env differently (2nd one does what you expect).

1 Like

Hi Darh, I have tried both the commands and defined AUTH_DEVELOPMENT_MODE in my .env also the AUTH_ASSETS_PATH and added in the auth-assets path in corteza folder and ran the commands you gave.

I then tried again to run the command:

corteza-server auth assets export /opt/deploy/corteza/auth-assets

but i still get a yellow bash eror “command not found”

My build is: cortezaproject/corteza:2022.3.5-rc.2

All my containers are up and 2 are healthy:

docker ps
CONTAINER ID   IMAGE                                  COMMAND                  CREATED        STATUS                  PORTS                                                                                           NAMES
40f417fa5ba0   nginx:latest                           "/docker-entrypoint.…"   23 hours ago   Up 23 hours             0.0.0                     .0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   nginx
3e3a5b307037   cortezaproject/corteza:2022.3.5-rc.2   "./bin/corteza-serve…"   23 hours ago   Up 23 hours (healthy)   80/tc                     p                                                                     corteza_server_1
6eaf3c4cb439   postgres:13                            "docker-entrypoint.s…"   23 hours ago   Up 23 hours (healthy)   5432/                     tcp                                                                   corteza_db_1

Please help me what to do?

Just to make sure – you’re running the corteza-server command from the server docker container, correct? If the command is still not found you can try running the binary directly; it should be in the /corteza/bin/corteza-server inside the docker container

where do i find this directory, ??