Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

kajiLabTeam/hacku-2023-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

223 Commits

Repository files navigation

MySQLコンテナとVoicevoxコンテナとGoコンテナの立ち上げ方

以下のコマンドをhacku-2023-backディレクトリで実行し、コンテナを立ち上げる

make up

コンテナが正しく動いているか確認したい場合

make log

MySQLのコンテナのサーバーにログインする

以下のコマンドをhacku-2023-backディレクトリで実行する

make mysql

Goコンテナに入る

以下のコマンドをhacku-2023-backディレクトリで実行する

make go

Voicevoxコンテナに入る

以下のコマンドをhacku-2023-backディレクトリで実行する

make voicevox

GoとMySQLの接続時に注意すること

mysql.ymlを変更してください

ローカルで実行したGoからDockerコンテナ内のMySQLに接続する時

mysql:
 user: root
 password: admin
 protocol: tcp(localhost:3306)
 dbname: data_sets

DockerコンテナのGoからDockerコンテナ内のMySQLに接続する時

mysql:
 user: root
 password: admin
 protocol: tcp(HackU2023_Nagoya_DB:3306)
 dbname: data_sets

どうしてもコンテナがうまく立ち上がらなかった時

以下のコマンドでDocker環境を初期化してください

 docker stop $(docker ps -aq)
 docker rm $(docker ps -aq)
 
 docker network prune -f
 docker rmi -f $(docker images --filter dangling=true -qa)
 docker volume rm $(docker volume ls --filter dangling=true -q)
 docker rmi -f $(docker images -qa)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /