Lan2Play/eventula-manager

Unable to start with docker-compose

Closed this issue · 4 comments

Please bear with me, I understand very little about docker.

I'm trying to get this to work on my local machine (Windows, Docker Desktop) before trying to figure it out on unRAID.

If I'm going about this the wrong way, please let me know!

Here's what I get?

eventula_manager_app           | In Connection.php line 759:
eventula_manager_app           |
eventula_manager_app           |   SQLSTATE[HY000] [1045] Access denied for user 'eventula_manager'@'172.22.0.
eventula_manager_app           |   2' (using password: YES) (SQL: select * from information_schema.tables wher
eventula_manager_app           |   e table_schema = eventula_manager_database and table_name = settings and ta
eventula_manager_app           |   ble_type = 'BASE TABLE')
eventula_manager_app           |
eventula_manager_app           |
eventula_manager_app           | In Connector.php line 70:
eventula_manager_app           |
eventula_manager_app           |   SQLSTATE[HY000] [1045] Access denied for user 'eventula_manager'@'172.22.0.
eventula_manager_app           |   2' (using password: YES)

Here is my docker-compose file:

services:
  app:
    image: lan2play/eventula-manager:latest
    volumes:
      - eventula_manager_certs:/etc/nginx/certs
      - eventula_manager_storage:/web/html/storage/
    environment:
      # App Config
      - APP_DEBUG=true
      - APP_ENV=local
      - APP_URL=localhost
      - ENV_OVERRIDE=true
      - APP_EMAIL=[email]@gmail.com
      # Database Settings
      - DB_DATABASE=eventula_manager_database
      - DB_USERNAME=eventula_manager
      - DB_PASSWORD="password"
      # Timezone
      - TIMEZONE=America/Chicago
      # Google Analytics
      - ANALYTICS_TRACKING_ID=
      # Paypal
      - PAYPAL_USERNAME=
      - PAYPAL_PASSWORD=
      - PAYPAL_SIGNATURE=
      # Steam
      - STEAM_API_KEY=[API_KEY]
      # Challonge
      - CHALLONGE_API_KEY=[API_KEY]
      # Facebook
      - FACEBOOK_APP_ID=
      - FACEBOOK_APP_SECRET=
      # File Logger
      - LOG_FILES=false
      # HTTPS
      - ENABLE_HTTPS=false
      # Reverse Proxy HTTPS
      - FORCE_APP_HTTPS=true
      # Only Secure Cookies
      - SESSION_SECURE_COOKIE=false
      # Migrate Database on Boot
      - DB_SEED=true
      - DB_MIGRATE=true
      # DO NOT CHANGE BELOW
      - DB_CONNECTION=mysql
      - DB_PORT=3306
      - DB_HOST=database
    container_name: eventula_manager_app
    ports:
      - 1080:1080
      - 10443:10443
  database:
    image: mysql:5.6
    volumes:
      - eventula_manager_database:/var/lib/mysql
    environment:
      # Change The password as according
      - MYSQL_PASSWORD="password"
      # DO NOT CHANGE BELOW
      - MYSQL_DATABASE=eventula_manager_database
      - MYSQL_USER=eventula_manager
      - MYSQL_RANDOM_ROOT_PASSWORD=true
    ports:
      - 3306:3306
    container_name: eventula_manager_database
  loadbalancer:
    image: traefik:v2.0
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - eventula_manager_certs:/certs:z
    - eventula_manager_acme:/acme:z
    ports:
    - 980:980/tcp
    - 9443:9443/tcp
    # Debug Only
    # - 8080:8080/tcp
    command:
    # Debug Only
    # - --api.insecure=true
    - --providers.docker=true
    - --entryPoints.web.address=:80
    - --entryPoints.websecure.address=:443
    - --providers.docker.exposedByDefault=false
    - --certificatesresolvers.le.acme.email=me@mydomain.com
    - --certificatesresolvers.le.acme.storage=/acme/acme.json
    - --certificatesresolvers.le.acme.tlschallenge=true
    container_name: eventula_manager_loadbalancer
volumes:
  eventula_manager_database:
    name:
      eventula_manager_database
  eventula_manager_certs:
    name:
      eventula_manager_certs
  eventula_manager_storage:
    name:
      eventula_manager_storage
  eventula_manager_acme:
    name:
      eventula_manager_acme

Here's what I changed from the template on the front page and why:

  • Under app: environment: DB_DATABASE, I changed it to "evenutla_manager_database" to match the one below inside database:
  • Under app: ports:, changed to 1080:1080 and 10443:10443 as I was getting an error stating that there was a port conflict. Also changed the ports in loadbalancer: too, wasn't sure what to change, so changed everything.
  • For both of the DB passwords, put quotes around the password (found with a google search)

I clearly don't know what I'm doing. All my dockers on my unRAID server were installed via Community Apps. Which I would absolutely love if you could support that! Here's how, if it helps.: https://forums.unraid.net/topic/57181-docker-faq/#comment-566084

If I go to the DockerHub, and use the docker pull lan2play/eventula-manager cmd, then it just immediately fails with this error:

Required Env Variable Check:
Setting APP_URL ... ERROR
Event Manager App is uninitialized because APP_URL is not specified 
You need to specify APP_URL

I almost had it with running this command (also from the description):

docker run -it -e APP_DEBUG=true -e APP_EMAIL=[email]@gmail.com -e APP_ENV=local -e APP_URL=localhost -e ENV_OVERRIDE=true -e DB_HOST=database -e DB_DATABASE=eventula_manager -e DB_PORT=3306 -e DB_USERNAME=eventula_manager -e DB_PASSWORD=password -e TIMEZONE=America/Chicago -e ANALYTICS_TRACKING_ID= -e PAYPAL_USERNAME= -e PAYPAL_PASSWORD= -e PAYPAL_SIGNATURE= -e STEAM_API_KEY=[KEY] -e CHALLONGE_API_KEY=[KEY] -e FACEBOOK_APP_ID= -e FACEBOOK_APP_SECRET= -e LOG_FILES=false -e ENABLE_HTTPS=false -e FORCE_APP_HTTPS=false -e SESSION_SECURE_COOKIE=false -e DB_CONNECTION=mysql -e DB_MIGRATE=true -e DB_SEED=true -p 80:80 -p 443:443 -v eventula_manager_storage:/web/html/storage/ --name eventula_manager_app lan2play/eventula-manager:latest

It kinda gets going, but then ends with this:

WAITING FOR database:3306...
wait-for.sh: waiting 30 seconds for database:3306
wait-for.sh: timeout occurred after waiting 30 seconds for database:3306
wait-for.sh: strict mode, refusing to execute subprocess

Hey Majawat, didnt expect you to be so fast with looking into our fork, currently the readme and the docs are not on the newest state, if i get to update those, it should get easy to have a copy and go example for it.

Never the less, first things first: Please dont run eventula in Docker for windows, since eventulas performance in this case is super super bad.

Seems like your database is initialized with another password. Make sure, you delete all the volumes for eventula one more time, so you can start over, then the sql image will create the credentials you entered in the docker-compose file.

Also, currently traefik is not tested for this version of eventula, we just use the app container itself (and in production bind it to 127.0.0.1 and use another nginx reverse proxy there which terminates with ssl).

And you should not use mysql 5.6 anymore. I also would not recommend to bind the mysql port to the outside, especially when you're not knowing what you are doing.

your port bindings will not work that way. The first port is the port that is mapped to your host, the second port is the port inside the contianer, so you would have to use 1080:80 and 10443:443 if you want to expose eventula on your machine on 1080 and 10443. Before you consider using eventula in production you have to make sure you understand how docker networking works, otherwise you can build seriously unsecure constructions.

Also i think you gonna just test it locally, so i would not use ssl for that case.

So, go ahead and remove all the containers and volumes you created and try the following docker-compose.yml

services:
  app:
    image: lan2play/eventula-manager:latest
    volumes:
      - eventula_manager_storage:/web/html/storage/
    environment:
      # App Config
      - APP_DEBUG=false
      - APP_ENV=production
      - APP_URL=localhost
      - ENV_OVERRIDE=true
      - APP_EMAIL=[email]@gmail.com
      # Database Settings
      - DB_DATABASE=eventula_manager_database
      - DB_USERNAME=eventula_manager
      - DB_PASSWORD="password"
      # Timezone
      - TIMEZONE=America/Chicago
      # Google Analytics
      - ANALYTICS_TRACKING_ID=
      # Paypal
      - PAYPAL_USERNAME=
      - PAYPAL_PASSWORD=
      - PAYPAL_SIGNATURE=
      # Steam
      - STEAM_API_KEY=[API_KEY]
      # Challonge
      - CHALLONGE_API_KEY=[API_KEY]
      # Facebook
      - FACEBOOK_APP_ID=
      - FACEBOOK_APP_SECRET=
      # File Logger
      - LOG_FILES=false
      # HTTPS
      - ENABLE_HTTPS=false
      # Reverse Proxy HTTPS
      - FORCE_APP_HTTPS=true
      # Only Secure Cookies
      - SESSION_SECURE_COOKIE=false
      # Migrate Database on Boot
      - DB_SEED=true
      - DB_MIGRATE=true
      # DO NOT CHANGE BELOW
      - DB_CONNECTION=mysql
      - DB_PORT=3306
      - DB_HOST=database
    container_name: eventula_manager_app
    ports:
      - 1080:80
      - 10443:443
  database:
    image: mysql:8
    volumes:
      - eventula_manager_database:/var/lib/mysql
    environment:
      # Change The password as according
      - MYSQL_PASSWORD="password"
      # DO NOT CHANGE BELOW
      - MYSQL_DATABASE=eventula_manager_database
      - MYSQL_USER=eventula_manager
      - MYSQL_RANDOM_ROOT_PASSWORD=true
    container_name: eventula_manager_database
volumes:
  eventula_manager_database:
    name:
      eventula_manager_database
  eventula_manager_storage:
    name:
      eventula_manager_storage


And for the unraid template, i don't think we will support that in the near future, because we just have no usecase for that.
To be clear: eventula is an application that aims for production usage on the internet and so you have to know how to work with linux and docker. Ntl, i think we can get you going so you can maybe get an deeper insight in docker and compose that you can make it work for yourself :)

And since this does not look like an real issue, but like a "support case" that needs personal explanation of some key concepts, do you have discord? If so, please Add me there Apfelwurm#5627 so we can figure out your problems :)