fossasia / open-event-server

The Open Event Organizer Server to Manage Events https://test-api.eventyay.com
https://api.eventyay.com
GNU General Public License v3.0
2.97k stars 1.89k forks source link

Can't loging as admin using docker #8711

Open tiagobatistacolab opened 2 years ago

tiagobatistacolab commented 2 years ago

Describe the bug I'm not able to login with the admin user in a docker installation.

Whenever I type the credentials I get the message "invalid credentials"

both server containers and frontend containers works normaly. I can, for example, create a new user from frontend. But without login as admin, I get my hands tied :cry:

here is my docker-compose.yml

version: '3.5'

x-environment-vars: &environment-vars
  POSTGRES_HOST: postgres
  DATABASE_URL: postgresql://open_event_user:opev_pass@postgres:5432/open_event
  REDIS_URL: redis://redis:6379/0
  ADMIN_EMAIL: "@{tiago@....}"
  ADMIN_PASSWORD: "@{c...}"

x-defaults: &defaults
  image: eventyay/open-event-server:development
  restart: unless-stopped
  env_file:
    - .env
  environment:
    <<: *environment-vars
  depends_on:
    - postgres
    - redis
  volumes:
   - ./static:/data/app/static
    - ./generated:/data/app/generated # Workaround for #6155

services:

  postgres:
    image: postgis/postgis:12-3.0-alpine
    container_name: opev-postgres
    restart: unless-stopped
    volumes:
      - pg:/var/lib/postgresql/data

environment:
      POSTGRES_USER: open_event_user
      POSTGRES_PASSWORD: opev_pass
      POSTGRES_DB: open_event

  redis:
    image: redis:3-alpine
    container_name: opev-redis
    restart: unless-stopped
    command: redis-server
    volumes:
      - rd:/var/lib/redis/data

  web:
    <<: *defaults
container_name: opev-web
    ports:
      - 8085:8080

  celery:
    <<: *defaults
    container_name: opev-celery
    depends_on:
      - web
    environment:
      <<: *environment-vars
      C_FORCE_ROOT: "true"
    command: celery

volumes:
    pg:
    rd:

and here my .env

#DATABASE_URL=postgresql:///oevent
#DATABASE_URL=postgresql://open_event_user:opev_pass@localhost:5432/oevent
#TEST_DATABASE_URL=postgresql:///opev_test
# TEST_DATABASE_URL=postgresql://open_event_user:opev_pass@localhost:5432/opev_>
SECRET_KEY=secret
INTEGRATE_SOCKETIO=false

# If using fast docker test DB, uncomment following line
# TEST_DATABASE_URL=postgresql://test@localhost:5433/test

#APP_CONFIG=config.DevelopmentConfig

POSTGRES_USER=open_event_user
POSTGRES_PASSWORD=opev_pass
POSTGRES_DB=open_event

FLASK_APP=app.instance
jacotec commented 1 year ago

Same here, I want to test Open Event and can't do anything because there is no admin login. @tiagobatistacolab Did you find a solution?

ianfoot commented 5 months ago

I managed to find the default admin username / password, though I don't see it anywhere in the documentation. It's open_event_test_user@fossasia.org / fossasia