Skip to content

Commit

Permalink
FIX: environment variable with docker-compose
Browse files Browse the repository at this point in the history
Merge pull request #29 from dennorske/patch-1
  • Loading branch information
MichaelBelgium authored Jul 17, 2021
2 parents 377b49a + 73663b0 commit 5c8cebc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN curl -sS https://getcomposer.org/installer | php \
#install the project
RUN cd /var/www/html && rm -rf *
RUN /usr/local/bin/composer create-project michaelbelgium/youtube-to-mp3 .
RUN sed -E 's/(define\("API_KEY"\, )""(\))/\1\getenv\("API_KEY"\)\2/' -i search.php
RUN sed -E 's/.*API_KEY.*/public function _constructor() { $this->API_KEY = getenv("API_KEY"); }/' -i src/Config.php
RUN mkdir /var/www/.cache/ && chmod 777 /var/www/ -R

0 comments on commit 5c8cebc

Please sign in to comment.