docker development documentation (#1625)
[openemr.git] / docker-compose.yml
blobb0efc87f64ba440bac577c41534ab453b09492e3
2 # This is for building a local OpenEMR development and testing environment.
3 # (Recommend not running it from your git repo and instead mirroring your
4 #  git repo to a testing directory (such as your web directory).)
6 # Brief instructions on how to use (for fuller instructions and examples,
7 #  see the document at contrib/util/docker/README.md):
8 #   1. docker-compose up -d
9 #   2. http://localhost:8080 to run setup in openemr (alpine 3.7 with PHP 7.1)
10 #      or
11 #      https://localhost:8090 to run setup in openemr with SSL (alpine 3.7 with PHP 7.1)
12 #      or
13 #      http://localhost:8081 to run setup in openemr (alpine edge with PHP 7.2)
14 #      or
15 #      https://localhost:8091 to run setup in openemr with SSL (alpine edge with PHP 7.2)
16 #  On the main setup input screen:
17 #   1. for Server Host, use either 'mysql' or 'mariadb' (have both mysql/mariadb dockers ready to go make testing either one easy)
18 #   2. for Root Pass, use 'root'
19 #   3. for User Hostname, use '%'
20 #  And when need to tear it down and restart it
21 #   1. docker-compose down -v
22 #   2. docker-compose up -d
23 #  Can see databases via:
24 #   -mariadb via http://localhost:8100
25 #   -mysql   via http://localhost:8101
27 version: '3.1'
28 services:
29   openemr-7-1:
30     restart: always
31     image: openemr/openemr:flex
32     ports:
33     - 8080:80
34     - 8090:443
35     volumes:
36     - .:/var/www/localhost/htdocs/openemr
37     environment:
38       EMPTY: "yes"
39   openemr-7-2:
40     restart: always
41     image: openemr/openemr:flex-edge
42     ports:
43     - 8081:80
44     - 8091:443
45     volumes:
46     - .:/var/www/localhost/htdocs/openemr
47     environment:
48       EMPTY: "yes"
49   mariadb:
50     restart: always
51     image: mariadb:10.2
52     command: ['mysqld','--character-set-server=utf8']
53     environment:
54       MYSQL_ROOT_PASSWORD: root
55   mysql:
56     restart: always
57     image: mysql:5.7
58     command: ['mysqld','--character-set-server=utf8']
59     environment:
60       MYSQL_ROOT_PASSWORD: root
61   phpmyadmin-mariadb:
62     restart: always
63     image: phpmyadmin/phpmyadmin
64     ports:
65     - 8100:80
66     environment:
67       PMA_HOST: mariadb
68   phpmyadmin-mysql:
69     restart: always
70     image: phpmyadmin/phpmyadmin
71     ports:
72     - 8101:80
73     environment:
74       PMA_HOST: mysql
75   couchdb:
76     restart: always
77     image: couchdb
78     environment:
79       COUCHDB_USER: admin
80       COUCHDB_PASSWORD: password