Skip to content

Commit

Permalink
username and password are now parametrized
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoGuideri committed Nov 28, 2024
1 parent 4597034 commit 8ffcb2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ COPY php.ini /usr/local/etc/php/
# Set file permissions for Apache
RUN chown -R www-data:www-data /var/www/html

ARG USERFEEDBACKCONSOLE_USER
ARG USERFEEDBACKCONSOLE_PASSWORD
RUN htpasswd -c -b /var/www/html/.htpasswd ${USERFEEDBACKCONSOLE_USER} ${USERFEEDBACKCONSOLE_PASSWORD}

# Expose port 80 for the web server
EXPOSE 80
7 changes: 6 additions & 1 deletion server/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
services:
php-app:
container_name: kuserfeedback-backend
build: .
build:
context: .
args:
- USERFEEDBACKCONSOLE_USER=${USERFEEDBACKCONSOLE_USER}
- USERFEEDBACKCONSOLE_PASSWORD=${USERFEEDBACKCONSOLE_PASSWORD}
ports:
- "${HOST_PHP_PORT}:80"
env_file:
- .env

depends_on:
db:
condition: service_healthy
Expand Down
3 changes: 3 additions & 0 deletions server/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export MYSQL_ROOT_PASSWORD='banana'
export GRAFANA_READER_USERNAME='grafanaReader'
export GRAFANA_READER_PASSWORD='grafanaReaderPassword'

export USERFEEDBACKCONSOLE_USER='admin'
export USERFEEDBACKCONSOLE_PASSWORD='admin'

export HOST_PHP_PORT=1984
export HOST_MYSQL_PORT=3307
export HOST_GRAFANA_PORT=3000

0 comments on commit 8ffcb2b

Please sign in to comment.