django-app 컨테이너에 attach해서 해줘야할 게 있음
python3 manage.py makemigrations python3 manage.py migrate python3 manage.py createsuperuser
A Docker - composer example that provides a Django, Flask, Java, Redis, Elasticsearch, MySQL, Postgres, and Mongo container
- Windows https://docs.docker.com/docker-for-windows/install/
- Mac https://docs.docker.com/docker-for-mac/install/
git clone https://github.com/Team-BDC/Complete_Docker
cd new_Docker
(docker-compose.yml과 동일경로)
$ docker-compose build
...
Successfully built a597836853da
docker-compose build
$ docker-compose up
If you prefer to use a daemon mode, Let’s run the above command in the background:
$ docker-compose up -d
http://localhost:8000
http://localhost:82
docker-compose build <custom service> docker-compose run <custom service> i.e. docker-compose build nodejs_app docker-compose run nodejs_app
https://redis.io/topics/rediscli
$ redis-cli -h localhost -p 6379
localhost:6379> exit
$ redis-cli ping
PONG
https://www.mysql.com/products/workbench/
mysql -h localhost -p 3306 -u root -p1234
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
But, you may not be able to connect via command line.
Please use workbench
# newDocker