twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
15.71k stars 1.7k forks source link

Hard to deploy stack on portainer #6211

Closed elefantemarketing closed 4 days ago

elefantemarketing commented 1 month ago

Following the documentation, docker compose yaml into twenty instructions, but erro 404 everytime, blank screen.

I will send the docker-compose file that i tried to deploy into container

version-twenty-check-it.txt

greptile-apps[bot] commented 1 month ago

To resolve the 404 error when deploying the stack on Portainer, ensure the following steps:

  1. Environment Variables: Verify that all required environment variables are correctly set in your .env file. Refer to the .env.example for guidance.

  2. Docker Compose File: Ensure you are using the correct docker-compose.yml file. Place it in the same directory as your .env file.

  3. Service Dependencies: Confirm that the db and server services are healthy and running. The server service depends on the db service being healthy.

  4. Health Checks: Check the health status of the server service using the health check endpoint defined in the docker-compose.yml file:

    healthcheck:
    test: curl --fail http://localhost:3000/healthz
    interval: 5s
    timeout: 5s
    retries: 10
  5. Port Configuration: Ensure that port 3000 is correctly mapped and accessible. The server service should expose port 3000:

    ports:
    - "3000:3000"
  6. Logs: Check the logs of the server and db services for any errors or issues. Use the following commands:

    docker-compose logs server
    docker-compose logs db
  7. Network Configuration: Ensure that the network configuration in Portainer allows communication between the services.

If the issue persists, please provide the specific docker-compose.yml file you are using for further assistance.

References

/packages/twenty-docker /packages/twenty-docker/docker-compose.yml /packages/twenty-postgres/docker/docker-compose.yml /packages/twenty-website/src/content/developers/self-hosting/docker-compose.mdx

#### About Greptile This response provides a starting point for your research, not a precise solution. Help us improve! Please leave a ๐Ÿ‘ if this is helpful and ๐Ÿ‘Ž if it is irrelevant. [Ask Greptile](https://app.greptile.com/chat/github/twentyhq/twenty/main) ยท [Edit Issue Bot Settings](https://app.greptile.com/apps/github)
elefantemarketing commented 1 month ago

version: "3.9"

services: change-vol-ownership: image: ubuntu user: root volumes:

volumes: docker-data: server-local-data: db-data-new:

networks: network_public: external: true

aficiomaquinas commented 1 month ago

i believe the API and SERVER_URL might be missing the external :3000 port? I was never able to make it work with traefik though also I believe that twenty expects a PORT env var... at least in my case I had to use it.

aficiomaquinas commented 1 month ago

the first step would be to know if you are able to make it work without traefik on a given port, because that 404 might be traefik or might be the twenty server, better to take that away and once you get it working without traefik then maybe put that on top? A bit more information on that 404 would be useful too.

elefantemarketing commented 1 month ago

traefik should be able to turn this port available?

aficiomaquinas commented 1 month ago

does the stack work without traefik?, do you get 404 without traefik?, at this point is difficult for me to give you advice because i don't have enough information, relevant logs from the server, the http 404 response response contains anything else? what are the headers of the response?, etc. As i said i wasn't able to make twenty run with traefik myself but a good first step is debug without. once you make it work without it will be easier to find out why traefik doesn't work

elefantemarketing commented 1 month ago

i tried with cloudflared services cutting of traefik and dos not work

aficiomaquinas commented 1 month ago

just a quick glance at your traefik suggests to me that you are missing the server base url, not just the api...

aficiomaquinas commented 1 month ago

again, without additional information, logs, http responses, chrome inspector logs, from your part it's gonna be tough to throw anything that could help you...

elefantemarketing commented 1 month ago

version: "3.9"

services: change-vol-ownership: image: ubuntu user: root volumes:

volumes: change-vol-ownership_data: external: true name: change-vol-ownership_data server_data: external: true name: server_data db_data: external: true name: db_data worker_data: external: true name: worker_data docker-data: external: true name: docker_data server-local-data: external: true name: server-local_data db-data-new: external: true name: db-data-new

networks: network_public: external: true name: network_public _twenty_worker.1.apk6cdtj95pulc3jgkmyzhnmc_logs.txt _twenty_server.1.w6rpocsstvbg6ahuf6jgkfnya_logs.txt _twenty_db.1.o4istlx1xmsgkuoguvph4wi79_logs.txt