Last active
July 26, 2023 12:37
-
-
Save bastienapp/9999609352f07da2943ddb5385393dd9 to your computer and use it in GitHub Desktop.
Docker deployment: MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mysql:8 | |
ENV MYSQL_ROOT_PASSWORD your_password_here | |
ENV TZ 'Europe/Paris' | |
ENV LANG C.UTF-8 | |
#You can uncomment the next line and create a schema.sql script, launched on startup | |
#ADD schema.sql /docker-entrypoint-initdb.d | |
CMD ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci", "--default-authentication-plugin=mysql_native_password"] | |
VOLUME /var/lib/mysql | |
EXPOSE 3306 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS database_name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment