Skip to content

Documentation on Dockerizing AdonisJS incomplete #224

@gdog2u

Description

@gdog2u

Package version

n/a

Describe the bug

The documentation for /Cookbooks/dockerize-adonis/ is incomplete by omitting what to do about the APP_KEY value. Following the instructions verbatim, and copy/pasting the config files here verbatim will result in the following output in the container's log.

2023-08-29 14:10:18 Exception: E_MISSING_ENV_VALUE: Missing environment variable "APP_KEY"
2023-08-29 14:10:18     at ensureValue (/home/node/app/node_modules/@adonisjs/env/build/src/Schema/helpers.js:26:15)
2023-08-29 14:10:18     at Object.validate [as APP_KEY] (/home/node/app/node_modules/@adonisjs/env/build/src/Schema/string.js:45:35)
2023-08-29 14:10:18     at /home/node/app/node_modules/@adonisjs/env/build/src/Env/index.js:87:60
2023-08-29 14:10:18     at Array.forEach (<anonymous>)
2023-08-29 14:10:18     at Env.process (/home/node/app/node_modules/@adonisjs/env/build/src/Env/index.js:86:44)
2023-08-29 14:10:18     at Application.loadEnvironmentVariables (/home/node/app/node_modules/@adonisjs/application/build/src/Application.js:303:18)
2023-08-29 14:10:18     at Application.setup (/home/node/app/node_modules/@adonisjs/application/build/src/Application.js:518:14)
2023-08-29 14:10:18     at AppKernel.boot (/home/node/app/node_modules/@adonisjs/core/build/src/Ignitor/Kernel/index.js:55:32)
2023-08-29 14:10:18     at HttpServer.start (/home/node/app/node_modules/@adonisjs/core/build/src/Ignitor/HttpServer/index.js:85:31)
2023-08-29 14:10:18     at Object.<anonymous> (/home/node/server.ts:21:4)
2023-08-29 14:11:34 {"level":30,"time":1693332694392,"pid":8,"hostname":"4cbf60af4c7b","name":"my-project-api","msg":"started server on 0.0.0.0:3333"}

The APP_KEY value is never mentioned in this guide.

Reproduction repo

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions