Remove sample config, reads env var by default #5
Conversation
Thanks, I will review! The TXXXXXXXX is the team ID, so that one install of Slackemon can be configured to run across multiple teams. Each team will have their own app token and OAuth key generated by Slack. |
phpdotenv is not supposed to be used in a production environment according to the author vlucas vlucas/phpdotenv#63 (comment) A proposed solution is to only load from .env in development only as below Copying comment from #4 $dotenv = new Dotenv\Dotenv();
if(getenv('APP_ENV') === 'development') {
$dotenv->load(__DIR__);
} |
Ah, just had a look at |
@Naramsim @juz501 This has been merged into |
Actually I can't build at the moment - Docker is giving me 'unknown instruction: USERMOD'. Will look into further tomorrow. |
I don't think you can add the \ to end the line and then append some comments after that (in the Dockerfile). I'm just guessing though. You can just get rid of the && \ and just put RUN per line in the Dockerfile and try. |
@juz501, Hey, you were totally right, I´ve added the comments and didn´t test afterward. |
Please, look at #4 before, if you want to merge, merge after #4.
This PR contains your config.php removed from .gitignore, and deletes the sample one.
Inside config.php I assign variables looking from env and Dotenv.
One thing:
define( 'SLACK_KEY__TXXXXXXXX', 'xoxp-0000000000-000000000000-000000000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' );
You are defining a key "SLACK_KEY__TXXXXXXXX", why all those Xs?