Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Portainer and Traefik Not Found #744

Open
projetosfsi opened this issue Aug 24, 2024 · 2 comments
Open

[Bug] Portainer and Traefik Not Found #744

projetosfsi opened this issue Aug 24, 2024 · 2 comments

Comments

@projetosfsi
Copy link

Describe the bug
Containers leave the docker network and because of this traefik cannot do the reverse proxy

To Reproduce
Steps to reproduce the behavior:

  1. Install Portainer and Traefik
  2. Create appflowy_network
  3. Get on the network appflowy_network in container traefik
  4. Create and Deploy Stack APPFLOWY

Expected behavior
Containers should all run within the same network and communicate properly.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser: Chrome
  • Version 128.0.6613.84 (Official Build) (64-bit)

Additional context

  • My Stack:
services:
  appflowy_cloud:
    image: appflowyinc/appflowy_cloud:0.5.59-amd64
    restart: unless-stopped
    depends_on:
      - appflowy_postgres
      - redis
      - gotrue
    environment:
      - APPFLOWY_DATABASE_URL=postgres://postgres:password@appflowy_postgres:5432/appflowy_db
      - APPFLOWY_REDIS_URI=redis://redis:6379
      - APPFLOWY_GOTRUE_JWT_SECRET=${GOTRUE_JWT_SECRET}
      - APPFLOWY_GOTRUE_BASE_URL=${APPFLOWY_GOTRUE_BASE_URL}
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.appflowy_cloud_api.rule=Host(`appflow.mysite.com`) && PathPrefix(`/api`)"
        - "traefik.http.routers.appflowy_cloud_api.entrypoints=web,websecure"
        - "traefik.http.routers.appflowy_cloud_api.tls.certresolver=leresolver"
        - "traefik.http.routers.appflowy_cloud_ws.rule=Host(`appflow.mysite.com`) && PathPrefix(`/ws`)"
        - "traefik.http.routers.appflowy_cloud_ws.entrypoints=web,websecure"
        - "traefik.http.routers.appflowy_cloud_ws.tls.certresolver=leresolver"
        - "traefik.http.middlewares.appflowy_cloud_cors.headers.accesscontrolallowmethods=GET,POST,PUT,DELETE,PATCH"
        - "traefik.http.middlewares.appflowy_cloud_cors.headers.accesscontrolalloworigin=*"
        - "traefik.http.middlewares.appflowy_cloud_cors.headers.accesscontrolallowheaders=Content-Type,Authorization,Accept,Client-Version"
        - "traefik.http.routers.appflowy_cloud_api.middlewares=appflowy_cloud_cors"
        - "traefik.http.services.appflowy_cloud_api.loadbalancer.server.port=8000"
        - "traefik.http.services.appflowy_cloud_ws.loadbalancer.server.port=8000"
    networks:
      - appflowy_network

  gotrue:
    image: appflowyinc/gotrue:0.5.59
    restart: unless-stopped
    depends_on:
      - gotrue_postgres
    environment:
      - GOTRUE_JWT_SECRET=${GOTRUE_JWT_SECRET}
      - GOTRUE_DATABASE_URL=postgres://postgres:password@gotrue_postgres:5432/gotrue_db
      - GOTRUE_SITE_URL=${APPFLOWY_GOTRUE_BASE_URL}
      - API_EXTERNAL_URL=${API_EXTERNAL_URL}
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.gotrue.rule=Host(`appflow.mysite.com`) && PathPrefix(`/gotrue`)"
        - "traefik.http.routers.gotrue.entrypoints=web"
        - "traefik.http.services.gotrue.loadbalancer.server.port=9999"
    networks:
      - appflowy_network

  redis:
    image: redis
    restart: unless-stopped
    networks:
      - appflowy_network

  appflowy_postgres:
    image: postgres
    restart: unless-stopped
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=appflowy_db
    volumes:
      - appflowy_postgres_data:/var/lib/postgresql/data
    networks:
      - appflowy_network

  gotrue_postgres:
    image: postgres
    restart: unless-stopped
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=gotrue_db
    volumes:
      - gotrue_postgres_data:/var/lib/postgresql/data
    networks:
      - appflowy_network

  admin_frontend:
    image: appflowyinc/admin_frontend:0.5.59-amd64
    restart: unless-stopped
    depends_on:
      - gotrue
      - redis
    environment:
      - ADMIN_FRONTEND_REDIS_URL=${ADMIN_FRONTEND_REDIS_URL}
      - ADMIN_FRONTEND_GOTRUE_URL=${ADMIN_FRONTEND_GOTRUE_URL}
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.admin_frontend.rule=Host(`appflow.mysite.com`) && PathPrefix(`/`)"
        - "traefik.http.routers.admin_frontend.entrypoints=web"
        - "traefik.http.services.admin_frontend.loadbalancer.server.port=3000"
    networks:
      - appflowy_network

  ai:
    image: appflowyinc/appflowy_ai:0.6.6
    restart: unless-stopped
    depends_on:
      - appflowy_cloud
    environment:
      - OPENAI_API_KEY=${APPFLOWY_AI_OPENAI_API_KEY}
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.ai.rule=Host(`appflow.mysite.com`) && PathPrefix(`/ai`)"
        - "traefik.http.routers.ai.entrypoints=web"
        - "traefik.http.services.ai.loadbalancer.server.port=5001"
    networks:
      - appflowy_network

  pgadmin:
    image: dpage/pgadmin4
    restart: unless-stopped
    environment:
      - PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
      - PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.pgadmin.rule=Host(`appflow.mysite.com`) && PathPrefix(`/pgadmin`)"
        - "traefik.http.routers.pgadmin.entrypoints=web"
        - "traefik.http.services.pgadmin.loadbalancer.server.port=80"
    networks:
      - appflowy_network

  minio:
    image: minio/minio
    restart: unless-stopped
    environment:
      - MINIO_ROOT_USER=${APPFLOWY_S3_ACCESS_KEY}
      - MINIO_ROOT_PASSWORD=${APPFLOWY_S3_SECRET_KEY}
    command: server /data --console-address ":9001"
    volumes:
      - minio_data:/data
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.minio.rule=Host(`appflow.mysite.com`) && PathPrefix(`/minio`)"
        - "traefik.http.routers.minio.entrypoints=web"
        - "traefik.http.services.minio.loadbalancer.server.port=9001"
    networks:
      - appflowy_network

volumes:
  appflowy_postgres_data:
  gotrue_postgres_data:
  minio_data:

networks:
  appflowy_network:
    external: true

@khorshuheng
Copy link
Collaborator

Can you share your .env file (and replace any sensitive information)?

@projetosfsi
Copy link
Author

Can you share your .env file (and replace any sensitive information)?

# Configurações do AppFlowy Cloud
APPFLOWY_GOTRUE_BASE_URL=http://gotrue:9999
APPFLOWY_DATABASE_URL=postgres://postgres:password@appflowy_postgres:5432/appflowy_db
APPFLOWY_ACCESS_CONTROL=true
APPFLOWY_WEBSOCKET_MAILBOX_SIZE=6000
APPFLOWY_DATABASE_MAX_CONNECTIONS=40

# Configurações do Admin Frontend
ADMIN_FRONTEND_REDIS_URL=redis://redis:6379
ADMIN_FRONTEND_GOTRUE_URL=http://gotrue:9999

# Chave de autenticação do GoTrue
GOTRUE_JWT_SECRET=useruser
GOTRUE_JWT_EXP=7200

# Configurações de Autoconfirmação de Email do GoTrue
GOTRUE_MAILER_AUTOCONFIRM=true
GOTRUE_RATE_LIMIT_EMAIL_SENT=100

# Configurações de SMTP (necessário se GOTRUE_MAILER_AUTOCONFIRM for false)
GOTRUE_SMTP_HOST=smtp.hostinger.com
GOTRUE_SMTP_PORT=465
[email protected]
GOTRUE_SMTP_PASS="@@pass2021"
[email protected]

# Credenciais do Admin para GoTrue
[email protected]
GOTRUE_ADMIN_PASSWORD="@@pass2021"

# URL Externa (usada para redirecionamentos e callbacks OAuth)
API_EXTERNAL_URL=https://appflowy.yourdomain.com.br

# URL de Banco de Dados do GoTrue
GOTRUE_DATABASE_URL=postgres://postgres:password@gotrue_postgres:5432/gotrue_db

# Configurações do OAuth (se você quiser habilitar OAuth)
GOTRUE_EXTERNAL_GOOGLE_ENABLED=false
GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=
GOTRUE_EXTERNAL_GOOGLE_SECRET=
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=http://appflowy.yourdomain.com.br/gotrue/callback

GOTRUE_EXTERNAL_GITHUB_ENABLED=false
GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=
GOTRUE_EXTERNAL_GITHUB_SECRET=
GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=http://appflowy.yourdomain.com.br/gotrue/callback

GOTRUE_EXTERNAL_DISCORD_ENABLED=false
GOTRUE_EXTERNAL_DISCORD_CLIENT_ID=
GOTRUE_EXTERNAL_DISCORD_SECRET=
GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=http://appflowy.yourdomain.com.br/gotrue/callback

# Configurações de Armazenamento de Arquivos (MinIO)
APPFLOWY_S3_USE_MINIO=true
APPFLOWY_S3_MINIO_URL=http://minio:9000
APPFLOWY_S3_ACCESS_KEY=minioadmin
APPFLOWY_S3_SECRET_KEY=minioadmin
APPFLOWY_S3_BUCKET=appflowy

# Configurações do Mailer do AppFlowy Cloud
APPFLOWY_MAILER_SMTP_HOST=smtp.hostinger.com
APPFLOWY_MAILER_SMTP_PORT=465
[email protected]
APPFLOWY_MAILER_SMTP_PASSWORD="@@pass2021"

# Nível de Log para o AppFlowy Cloud
RUST_LOG=info

# Configurações do PgAdmin
[email protected]
PGADMIN_DEFAULT_PASSWORD="@@pass2021"


# Configurações de IA (se estiver usando)
APPFLOWY_AI_OPENAI_API_KEY=your-openai-api-key
APPFLOWY_AI_SERVER_PORT=5001
APPFLOWY_AI_SERVER_HOST=ai
APPFLOWY_AI_DATABASE_URL=postgresql+psycopg://postgres:password@postgres:5432/postgres
APPFLOWY_LOCAL_AI_TEST_ENABLED=false

# Configurações do AppFlowy History
APPFLOWY_HISTORY_URL=http://localhost:50051
APPFLOWY_HISTORY_REDIS_URL=redis://redis:6379
APPFLOWY_HISTORY_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres

# Configurações do AppFlowy Indexer
APPFLOWY_INDEXER_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres
APPFLOWY_INDEXER_REDIS_URL=redis://redis:6379


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

No branches or pull requests

2 participants