Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

User not found when running setAdmin command after deploying docker stack. #41

Open
madsamjp opened this issue Jun 10, 2023 · 1 comment

Comments

@madsamjp
Copy link

I'm trying to run the dockerized version locally for testing before deploying to a production environment.

I setup the docker-compose.yml file, and nginx/default.conf as per the instructions. I start the stack using docker-compose up and everything seems to work. I can access the Movim UI from my browser.

I then go on to run the command: docker-compose exec movim php daemon.php setAdmin [email protected] (with my own JIB), but I get the error: User [email protected] not found

How can I fix this? - Any help would be much appreciated.

Here is my docker-compose.yml:

services:
  movim:
    environment:
      DAEMON_URL: http://localhost
      DAEMON_PORT: 8080
      DAEMON_INTERFACE: 127.0.0.1
      DB_DRIVER: pgsql
      DB_HOST: postgresql
      DB_PORT: 5432
      DB_DATABASE: movim
      DB_USERNAME: movim
      DB_PASSWORD: changeme
    image: movim/movim:0.21.1
    volumes:
    - ${PWD}/movim:/var/www/html:rw

  nginx:
    image: nginx:mainline-alpine
    ports:
    - published: 8833
      target: 80
    volumes:
    - ${PWD}/movim:/var/www/html:ro
    - ${PWD}/nginx:/etc/nginx/conf.d:ro
    dns:
      8.8.8.8

  postgresql:
    environment:
      POSTGRES_DB: movim
      POSTGRES_PASSWORD: changeme
      POSTGRES_USER: movim
    image: postgres:15-alpine
    volumes:
    - ${PWD}/postgres/data:/var/lib/postgresql/data:rw
version: '3.7'

my nginx/default.conf:

upstream movim-http {
    server movim:9000;
}
upstream movim-ws {
    server movim:8080;
}

fastcgi_cache_path /tmp/nginx_cache levels=1:2 keys_zone=nginx_cache:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

server {
    listen 80;
    server_name localhost;

    index index.php index.html;

    root /var/www/html/public;

    location / {
        try_files $uri /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass movim-http;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }

    location /ws/ {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_redirect off;
    }

    location /picture {
        include fastcgi_params;

        add_header X-Cache $upstream_cache_status;
        fastcgi_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
        fastcgi_cache nginx_cache;
        fastcgi_cache_key $request_method$host$request_uri;
        fastcgi_cache_valid any 1h;
    }
}

@kawaii
Copy link
Member

kawaii commented Jun 11, 2023

You need to have logged in at least once with the user you are trying to make an administrator.

Also, you should set your DAEMON_INTERFACE environment variable to 0.0.0.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants