Actually ‘docker-compose down -v’ will stop containers, remove containers, and remove volumes (-v does volumes). Then a ‘docker-compose up’ should work.
So, the above will basically delete everything and let you start again.
Below is some cool stuff that can do to stop/start etc. Here’s a sample docker-compose.yml build that also brings in phpmyadmin, which is pretty neat:
# admin/pass are default user/password credentials for openemr
# openemr is default mysql database
# openemr/openemr are default user/password credentials for mysql openemr database
version: '3.1'
services:
mysql:
restart: always
image: mysql
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
openemr:
restart: always
image: openemr/openemr
ports:
- 80:80
- 443:443
volumes:
- logvolume01:/var/log
- sitevolume:/var/www/localhost/htdocs/openemr/sites
environment:
MYSQL_HOST: mysql
MYSQL_ROOT_PASS: root
links:
- mysql
phpmyadmin:
restart: always
image: phpmyadmin/phpmyadmin
ports:
- 81:80
environment:
PMA_HOST: mysql
links:
- mysql
volumes:
logvolume01: {}
sitevolume: {}
ok, lets run docker-compose up in the background (just give it a couple minutes after run it):
docker-compose up -d
After a couple minutes, then openemr and phpmyadmin should be working fine.
Now, lets stop them all:
docker-compose stop
Now lets restart them all:
docker-compose start
Now openemr and phpmyadmin should be working
Now lets just stop phpmyadmin:
docker-compose stop phpmyadmin
-brady