Skip to content

Bad docker realisation #184

@LeonusDH

Description

@LeonusDH

Describe the bug
Because of how you wrote the scripts in package.json, namely “prod,” the entire Docker image is broken.

You build the project, then copy the built project to another layer where you build the project again when you try to run it. I don't know if you tested this at all, but since you just copy the files to a new layer without tsconfig, the bot simply cannot start.

In addition, in docker-compose, you transfer the internal ports of the containers to the external network, which is not secure.
Either create a separate network for them in the same compose, or convert everything to the 127.0.0.1:8080:8080 format so that the ports are only forwarded to the host.

It is also worth noting those images in compose that are optional and not required for the bot to work correctly, such as mongo-express.

To Reproduce
Steps to reproduce the behavior:

  1. Launch the project using docker-compose
  2. Check the logs docker compose logs supportbot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions