Add mariadb timezone setting via WORKSPACE_TIMEZONE in .env (#2197)
This commit is contained in:
parent
8ae02d5d96
commit
6eaf587803
@ -407,6 +407,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "${MARIADB_PORT}:3306"
|
- "${MARIADB_PORT}:3306"
|
||||||
environment:
|
environment:
|
||||||
|
- TZ=${WORKSPACE_TIMEZONE}
|
||||||
- MYSQL_DATABASE=${MARIADB_DATABASE}
|
- MYSQL_DATABASE=${MARIADB_DATABASE}
|
||||||
- MYSQL_USER=${MARIADB_USER}
|
- MYSQL_USER=${MARIADB_USER}
|
||||||
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
|
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
|
||||||
|
@ -2,6 +2,13 @@ FROM mariadb:latest
|
|||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set Timezone
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG TZ=UTC
|
||||||
|
ENV TZ ${TZ}
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
|
||||||
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||||
|
|
||||||
CMD ["mysqld"]
|
CMD ["mysqld"]
|
||||||
|
Loading…
Reference in New Issue
Block a user