Skip to content

Commit

Permalink
New build docs and new easy development docker environment (openemr#1837
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Daniel Sandoval authored and bradymiller committed Sep 15, 2018
1 parent 77ad0dd commit 7657a73
Show file tree
Hide file tree
Showing 8 changed files with 3,693 additions and 3,805 deletions.
34 changes: 33 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@ Thank you for your contribution. OpenEMR (and global healthcare) continues to ge

The maintainers of OpenEMR want to get your pull request in as seamlessly as possible, so please ensure your code is consistent with our [development policies](http:https://open-emr.org/wiki/index.php/Development_Policies).

## Code Contributions (local development)
You will need a "local" version of OpenEMR to make changes to the source code. The easiest way to do this is with [Docker](https://hub.docker.com/r/openemr/openemr/):

1. [Create your own fork of OpenEMR](https://github.com/openemr/openemr/fork) (you will need a GitHub account) and `git clone` it to your local machine.
- It's best to also add an `upstream` origin to keep your local fork up to date. [Check out this guide](https://oneemptymind.wordpress.com/2018/07/11/keeping-a-fork-up-to-date/) for more info.
2. `cd openemr` (the directory you cloned the code into)
- If you haven't already, [install Docker](https://docs.docker.com/install/) for your system
3. Edit `docker-compose.yml` to use your fork's git url and branch name for `FLEX_REPOSITORY` and `FLEX_REPOSITORY_BRANCH`
- For example:
```
FLEX_REPOSITORY: https://github.com/[my_user_name]/openemr.git
FLEX_REPOSITORY_BRANCH: master
```
4. Run `docker-compose up` from your command line
- When the build is done, you'll see the following message:
```
openemr_1 | Love OpenEMR? You can now support the project via the open collective:
openemr_1 | > https://opencollective.com/openemr/donate
openemr_1 |
openemr_1 | Starting cron daemon!
openemr_1 | Starting apache!
```
5. Navigate to `http:https://localhost:8300/` to login as `admin`. Password is `pass`.
6. Make changes to any files on your local file system. Most changes will appear after a refresh of the page or iFrame you're working on...
- Note that changes to SCSS files will not automatically show unless the node build process is running. For more info on this, see the [README.md in /interface](interface/README.md)
7. When you're done, it's best to clean up after yourself with `docker-compose down -v`
- If you don't want to build from scratch every time, just use `docker-compose down` so your next `docker-compose up` will use the cached volumes.
8. [Submit a PR](https://github.com/openemr/openemr/compare) from your fork into `openemr/openemr#master`!

We look forward to your contribution...

If you do not want to use Docker, you can always install OpenEMR directly on your local environment. This will require installing additional dependencies for your operating system. For more info see [OpenEMR Development Versions](https://open-emr.org/wiki/index.php/OpenEMR_Installation_Guides#OpenEMR_Development_Versions) on the wiki.

## Financial contributions

Expand Down Expand Up @@ -38,4 +70,4 @@ Thank you to all our sponsors! (please ask your company to also support this ope
<a href="https://opencollective.com/openemr/sponsor/6/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/openemr/sponsor/7/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/openemr/sponsor/8/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/openemr/sponsor/9/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/openemr/sponsor/9/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/9/avatar.svg"></a>
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

OpenEMR is a leader in healthcare open source software. Costly proprietary EMRs are no longer the only option. [Learn how to start contributing today!](http:https://open-emr.org/wiki/index.php/FAQ#How_do_I_begin_to_volunteer_for_the_OpenEMR_project.3F)

> Already comfortable with git? Check out [CONTRIBUTING.md](CONTRIBUTING.md) for quick setup instructions
### Support

Community and Professional support can be found [here](http:https://open-emr.org/wiki/index.php/OpenEMR_Support_Guide).
Expand Down
274 changes: 274 additions & 0 deletions contrib/util/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@

#
# This is for building a local OpenEMR development and testing environment.
# (Recommend not running it from your git repo and instead mirroring your
# git repo to a testing directory (such as your web directory).)
#
# Brief instructions on how to use (for fuller instructions and examples,
# see the document at contrib/util/docker/README.md):
# 1. docker-compose up -d
# 2. Choose one of any of the following links:
# http:https://localhost:8080 (with Apache and PHP 7.1)
# http:https://localhost:8081 (with Apache and PHP 7.2)
# http:https://localhost:8082 (with Apache and PHP 7.1 with redis)
# http:https://localhost:8083 (with Apache and PHP 7.2 with redis)
# http:https://localhost:8090 (with Nginx and PHP-FPM 5.6)
# http:https://localhost:8091 (with Nginx and PHP-FPM 7.0)
# http:https://localhost:8092 (with Nginx and PHP-FPM 7.1)
# http:https://localhost:8093 (with Nginx and PHP-FPM 7.2)
# http:https://localhost:8094 (with Nginx and PHP-FPM 7.3)
# http:https://localhost:8095 (with Nginx and PHP-FPM 5.6 with redis)
# http:https://localhost:8096 (with Nginx and PHP-FPM 7.0 with redis)
# http:https://localhost:8097 (with Nginx and PHP-FPM 7.1 with redis)
# http:https://localhost:8098 (with Nginx and PHP-FPM 7.2 with redis)
# http:https://localhost:8099 (with Nginx and PHP-FPM 7.3 with redis)
# https://localhost:9080 with SSL (with Apache and PHP 7.1)
# https://localhost:9081 with SSL (with Apache and PHP 7.2)
# https://localhost:9082 with SSL (with Apache and PHP 7.1 with redis)
# https://localhost:9083 with SSL (with Apache and PHP 7.2 with redis)
# https://localhost:9090 with SSL (with Nginx and PHP-FPM 5.6)
# https://localhost:9091 with SSL (with Nginx and PHP-FPM 7.0)
# https://localhost:9092 with SSL (with Nginx and PHP-FPM 7.1)
# https://localhost:9093 with SSL (with Nginx and PHP-FPM 7.2)
# https://localhost:9094 with SSL (with Nginx and PHP-FPM 7.3)
# https://localhost:9095 with SSL (with Nginx and PHP-FPM 5.6 with redis)
# https://localhost:9096 with SSL (with Nginx and PHP-FPM 7.0 with redis)
# https://localhost:9097 with SSL (with Nginx and PHP-FPM 7.1 with redis)
# https://localhost:9098 with SSL (with Nginx and PHP-FPM 7.2 with redis)
# https://localhost:9099 with SSL (with Nginx and PHP-FPM 7.3 with redis)
#
# On the main setup input screen:
# 1. for Server Host, use either 'mariadb' or 'mysql' or `mariadb-dev` or 'mysql-dev' or 'mysql-old' or 'mysql-very-old' or 'mariadb-old' or 'mariadb-very-old' or 'mariadb-very-very-old' (have both mariadb/mysql/mariadb-dev/mysql-dev dockers ready to go make testing either one easy; mysql is version 5.7; mysql-dev is version 8; mysql-old is version 5.6; mysql-very-old is version 5.5; mariadb is version 10.2 and mariadb-dev is version 10.3; mariadb-old is version 10.1; mariadb-very-old is version 10.0; mariadb-very-very-old is version 5.5)
# 2. for Root Pass, use 'root'
# 3. for User Hostname, use '%'
# And when need to tear it down and restart it
# 1. docker-compose down -v
# 2. docker-compose up -d
# Can see databases via http:https://localhost:8200
#
version: '3.1'
services:
openemr-7-1:
restart: always
image: openemr/openemr:flex-3.7
ports:
- 8080:80
- 9080:443
volumes:
- ../../..:/var/www/localhost/htdocs/openemr
environment:
EMPTY: "yes"
openemr-7-2:
restart: always
image: openemr/openemr:flex-3.8
ports:
- 8081:80
- 9081:443
volumes:
- ../../..:/var/www/localhost/htdocs/openemr
environment:
FORCE_NO_BUILD_MODE: "yes"
EMPTY: "yes"
openemr-7-1-redis:
restart: always
image: openemr/openemr:flex-3.7
ports:
- 8082:80
- 9082:443
volumes:
- ../../..:/var/www/localhost/htdocs/openemr
environment:
FORCE_NO_BUILD_MODE: "yes"
REDIS_SERVER: "redis"
EMPTY: "yes"
openemr-7-2-redis:
restart: always
image: openemr/openemr:flex-3.8
ports:
- 8083:80
- 9083:443
volumes:
- ../../..:/var/www/localhost/htdocs/openemr
environment:
FORCE_NO_BUILD_MODE: "yes"
REDIS_SERVER: "redis"
EMPTY: "yes"
mariadb:
restart: always
image: mariadb:10.2
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
mysql:
restart: always
image: mysql:5.7
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
mariadb-dev:
restart: always
image: mariadb:10.3
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
mysql-dev:
restart: always
image: mysql:8
command: ['mysqld','--character-set-server=utf8','--default-authentication-plugin=mysql_native_password']
environment:
MYSQL_ROOT_PASSWORD: root
mariadb-old:
restart: always
image: mariadb:10.1
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
mariadb-very-old:
restart: always
image: mariadb:10.0
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
mariadb-very-very-old:
restart: always
image: mariadb:5.5
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
mysql-old:
restart: always
image: mysql:5.6
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
mysql-very-old:
restart: always
image: mysql:5.5
command: ['mysqld','--character-set-server=utf8']
environment:
MYSQL_ROOT_PASSWORD: root
phpmyadmin:
restart: always
image: phpmyadmin/phpmyadmin
ports:
- 8200:80
environment:
PMA_HOSTS: mariadb,mysql,mariadb-dev,mysql-dev,mysql-old,mysql-very-old,mariadb-old,mariadb-very-old,mariadb-very-very-old
couchdb:
restart: always
image: couchdb
ports:
- 5984:5984
- 6984:6984
environment:
COUCHDB_USER: admin
COUCHDB_PASSWORD: password
orthanc:
restart: always
image: jodogne/orthanc-plugins
ports:
- 4242:4242
- 8042:8042
nginx:
restart: always
image: openemr/dev-nginx
ports:
- 8090:80
- 9090:443
- 8091:81
- 9091:444
- 8092:82
- 9092:445
- 8093:83
- 9093:446
- 8094:84
- 9094:447
- 8095:85
- 9095:448
- 8096:86
- 9096:449
- 8097:87
- 9097:450
- 8098:88
- 9098:451
- 8099:89
- 9099:452
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./dockers/dev-nginx/dummy-cert:/etc/nginx/dummy-cert:ro
- ./dockers/dev-nginx/dummy-key:/etc/nginx/dummy-key:ro
depends_on:
- dev-php-fpm-5-6
- dev-php-fpm-7-0
- dev-php-fpm-7-1
- dev-php-fpm-7-2
- dev-php-fpm-7-3
- dev-php-fpm-5-6-redis
- dev-php-fpm-7-0-redis
- dev-php-fpm-7-1-redis
- dev-php-fpm-7-2-redis
- dev-php-fpm-7-3-redis
dev-php-fpm-5-6:
restart: always
image: openemr/dev-php-fpm:5.6
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-5-6/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-0:
restart: always
image: openemr/dev-php-fpm:7.0
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-0/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-1:
restart: always
image: openemr/dev-php-fpm:7.1
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-1/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-2:
restart: always
image: openemr/dev-php-fpm:7.2
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-2/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-3:
restart: always
image: openemr/dev-php-fpm:7.3
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-3/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-5-6-redis:
restart: always
image: openemr/dev-php-fpm:5.6-redis
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-5-6-redis/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-0-redis:
restart: always
image: openemr/dev-php-fpm:7.0-redis
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-0-redis/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-1-redis:
restart: always
image: openemr/dev-php-fpm:7.1-redis
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-1-redis/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-2-redis:
restart: always
image: openemr/dev-php-fpm:7.2-redis
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-2-redis/php.ini:/usr/local/etc/php/php.ini:ro
dev-php-fpm-7-3-redis:
restart: always
image: openemr/dev-php-fpm:7.3-redis
volumes:
- ../../..:/usr/share/nginx/html/openemr
- ./dockers/dev-php-fpm-7-3-redis/php.ini:/usr/local/etc/php/php.ini:ro
redis:
restart: always
image: redis
Loading

0 comments on commit 7657a73

Please sign in to comment.