akaunting / docker

Docker Image for Akaunting
https://github.com/akaunting/akaunting
GNU General Public License v3.0
182 stars 85 forks source link

502 Bad Gateway - Nginx Proxy Manager #106

Closed sukhcha-in closed 9 months ago

sukhcha-in commented 9 months ago

I've installed Akaunting using Docker. But when accessing through my domain it is throwing 502 Bad Gateway. I am using Nginx Proxy Manager, added http://akaunting:7004 as proxy host. Domain is having a SSL certificate.

I am able to open http://[SERVER_IP]:7004 but it is stating 404 on every page. Maybe that's because of APP_URL set in environment variable?

I've modified docker-compose.yml file a bit for local networking and custom port:

version: '3.7'

services:
  akaunting:
    container_name: akaunting
    image: docker.io/akaunting/akaunting:latest
    build:
      context: .
    ports:
      - 7004:80
    volumes:
      - akaunting-data:/var/www/html
    restart: unless-stopped
    env_file:
      - env/run.env
    environment:
      - AKAUNTING_SETUP
    depends_on:
      - akaunting-db
    networks:
      - npm
      - storage

  akaunting-db:
    container_name: akaunting-db
    image: mariadb
    volumes:
      - akaunting-db:/var/lib/mysql
    restart: unless-stopped
    env_file:
      - env/db.env
    networks:
      - storage

volumes:
  akaunting-data:
  akaunting-db:

networks:
  npm:
    external: true
  storage:

Looks like app was able to create the user successfully. Container logs:

Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart
Setting locale en-US
Creating database tables
Connecting to database akaunting_db@akaunting-db:3306
Creating company
Creating admin
Applying the final touches

Is there any issue with my setup?

sukhcha-in commented 9 months ago

I was using wrong port :/