Skip to content

Commit

Permalink
Reset time zone and locale settings to default (ucan-lab#14)
Browse files Browse the repository at this point in the history
* feat Reset MySQL collation settings to default

* feat Reset time zone and locale settings to default
  • Loading branch information
ucan-lab authored May 9, 2020
1 parent d8b127b commit 0ca3a5f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion infrastructure/docker/mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mysql:8.0

ENV TZ=Asia/Tokyo \
ENV TZ=UTC \
MYSQL_DATABASE=laravel_local \
MYSQL_USER=phper \
MYSQL_PASSWORD=secret \
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/docker/mysql/my.cnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[mysqld]
character_set_server = utf8mb4
collation_server = utf8mb4_ja_0900_as_cs_ks
collation_server = utf8mb4_0900_ai_ci

# timezone
default-time-zone = SYSTEM
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/docker/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:14.2-alpine as node
FROM nginx:1.17-alpine
SHELL ["/bin/ash", "-oeux", "pipefail", "-c"]

ENV TZ=Asia/Tokyo
ENV TZ=UTC

RUN apk update && \
apk add --update --no-cache --virtual=.build-dependencies g++
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/docker/nginx/Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apk update && \

FROM nginx:1.17-alpine

ENV TZ=Asia/Tokyo
ENV TZ=UTC
COPY --from=node /work/backend/public /work/backend/public
COPY --from=node /work/backend/storage/app/public /work/backend/public/storage
COPY ./default.conf /etc/nginx/conf.d/default.conf
Expand Down
12 changes: 6 additions & 6 deletions infrastructure/docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ SHELL ["/bin/bash", "-oeux", "pipefail", "-c"]
ARG REDIS_VER=5.2.2

# timezone environment
ENV TZ=Asia/Tokyo \
ENV TZ=UTC \
# locale
LANG=ja_JP.UTF-8 \
LANGUAGE=ja_JP:ja \
LC_ALL=ja_JP.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
# composer environment
COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_HOME=/composer \
Expand All @@ -29,8 +29,8 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

RUN apt-get update && \
apt-get -y install git libicu-dev libonig-dev libzip-dev unzip locales && \
locale-gen ja_JP.UTF-8 && \
localedef -f UTF-8 -i ja_JP ja_JP.utf8 && \
locale-gen en_US.UTF-8 && \
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
mkdir /var/run/php-fpm && \
mkdir /var/log/php && \
git clone -b $REDIS_VER https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis && \
Expand Down
12 changes: 6 additions & 6 deletions infrastructure/docker/php/Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ ARG GITHUB_DEPLOY_PRIVATE_KEY
ARG REDIS_VER=5.2.2

# timezone environment
ENV TZ=Asia/Tokyo \
ENV TZ=UTC \
# locale
LANG=ja_JP.UTF-8 \
LANGUAGE=ja_JP:ja \
LC_ALL=ja_JP.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
# composer environment
COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_HOME=/composer \
Expand All @@ -28,8 +28,8 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

RUN apt-get update && \
apt-get -y install git libicu-dev libonig-dev libzip-dev unzip locales && \
locale-gen ja_JP.UTF-8 && \
localedef -f UTF-8 -i ja_JP ja_JP.utf8 && \
locale-gen en_US.UTF-8 && \
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
mkdir /var/run/php-fpm && \
mkdir /var/log/php && \
git clone -b $REDIS_VER https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis && \
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/docker/php/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ error_log = /var/log/php/php-error.log
default_charset = UTF-8

[Date]
date.timezone = Asia/Tokyo
date.timezone = ${TZ}

[mysqlnd]
mysqlnd.collect_memory_statistics = on
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/docker/php/php.production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ error_log = /var/log/php/php-error.log
default_charset = UTF-8

[Date]
date.timezone = Asia/Tokyo
date.timezone = ${TZ}

[mysqlnd]
mysqlnd.collect_memory_statistics = off
Expand Down

0 comments on commit 0ca3a5f

Please sign in to comment.