Skip to content

Commit

Permalink
Merge pull request #91 from larslemos/dev
Browse files Browse the repository at this point in the history
Updated folder for dev worklfow, fix hidden folder
  • Loading branch information
larslemos authored Sep 17, 2023
2 parents f29ea72 + 17efd49 commit d4dcb43
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# OpenMRS
OPENMRS_DB_USER=openmrs
OPENMRS_DB_PASSWORD=password
OPENMRS_USER=admin
OPENMRS_PASSWORD=Admin123

# MySQL
MYSQL_ROOT_PASSWORD=YOUR_PREFERRED_MYSQL_ROOT_PASSWORD
2 changes: 1 addition & 1 deletion .github/workflows/ohri-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Copy files to /home/runner/
run: |
ls -la -t
cp -r $GITHUB_WORKSPACE/.ssh/ /home/runner/
cp -r $GITHUB_WORKSPACE/.github/ssh/ /home/runner/
- name: List contents of /home/runner/
run: ls -la /home/runner/
Expand Down
63 changes: 63 additions & 0 deletions docker-compose-ohri-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: "3.7"

services:
gateway:
image: histacoohri/ohri-dev-proxy:next
depends_on:
- frontend
- backend
ports:
- "80:80"

frontend:
image: histacoohri/ohri-dev-frontend:next
environment:
SPA_PATH: /openmrs/spa
API_URL: /openmrs
SPA_CONFIG_URLS: /openmrs/spa/ohri-config.json
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
timeout: 10s
depends_on:
- backend

backend:
image: histacoohri/ohri-dev-backend-2_6:next
depends_on:
- db
environment:
OMRS_CONFIG_MODULE_WEB_ADMIN: "true"
OMRS_CONFIG_AUTO_UPDATE_DATABASE: "true"
OMRS_CONFIG_CREATE_TABLES: "true"
OMRS_CONFIG_CONNECTION_SERVER: db
OMRS_CONFIG_CONNECTION_DATABASE: openmrs
OMRS_CONFIG_CONNECTION_USERNAME: ${OPENMRS_DB_USER:-openmrs}
OMRS_CONFIG_CONNECTION_PASSWORD: ${OPENMRS_DB_PASSWORD:-openmrs}
OMRS_JAVA_SERVER_OPTS: "-Dfile.encoding='UTF-8' -server -Xms1024m -Xmx6144m -Djava.security.egd='file:/dev/./urandom' -Djava.awt.headless='true' -Djava.awt.headlesslib='true'"
healthcheck:
disable: true
#test: ["CMD", "curl", "-f", "http://localhost:8080/openmrs"]
#timeout: 10s
volumes:
- ohri-openmrs-data:/openmrs/data

# MariaDB
db:
image: mariadb:10.8.2
command: "mysqld --character-set-server=utf8 --collation-server=utf8_general_ci"
healthcheck:
test: 'mysql --user=${OMRS_DB_USER:-openmrs} --password=${OMRS_DB_PASSWORD:-openmrs} --execute "SHOW DATABASES;"'
interval: 10s
timeout: 5s
retries: 5
environment:
MYSQL_DATABASE: openmrs
MYSQL_USER: ${OMRS_DB_USER:-openmrs}
MYSQL_PASSWORD: ${OMRS_DB_PASSWORD:-openmrs}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-openmrs}
volumes:
- ohri-db-data:/var/lib/mysql

volumes:
ohri-openmrs-data: ~
ohri-db-data: ~
66 changes: 66 additions & 0 deletions docker-compose-ohri-working.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
version: "3.7"

services:
gateway:
image: histacoohri/ohri-working-proxy:next
depends_on:
- frontend
- backend
ports:
- "80:80"

frontend:
image: histacoohri/ohri-working-frontend:next
environment:
SPA_PATH: /openmrs/spa
API_URL: /openmrs
SPA_CONFIG_URLS: /openmrs/spa/ohri-config.json
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
timeout: 10s
depends_on:
- backend
# OHRI customizations
#volumes:
# - ./frontend/ohri-config.json:/usr/share/nginx/html/ohri-config.json

backend:
image: histacoohri/ohri-working-backend-2_6:next
depends_on:
- db
environment:
OMRS_CONFIG_MODULE_WEB_ADMIN: "true"
OMRS_CONFIG_AUTO_UPDATE_DATABASE: "true"
OMRS_CONFIG_CREATE_TABLES: "true"
OMRS_CONFIG_CONNECTION_SERVER: db
OMRS_CONFIG_CONNECTION_DATABASE: openmrs
OMRS_CONFIG_CONNECTION_USERNAME: ${OPENMRS_DB_USER:-openmrs}
OMRS_CONFIG_CONNECTION_PASSWORD: ${OPENMRS_DB_PASSWORD:-openmrs}
OMRS_JAVA_SERVER_OPTS: "-Dfile.encoding='UTF-8' -server -Xms1024m -Xmx6144m -Djava.security.egd='file:/dev/./urandom' -Djava.awt.headless='true' -Djava.awt.headlesslib='true'"
healthcheck:
disable: true
#test: ["CMD", "curl", "-f", "http://localhost:8080/openmrs"]
#timeout: 10s
volumes:
- ohri-openmrs-data:/openmrs/data

# MariaDB
db:
image: mariadb:10.8.2
command: "mysqld --character-set-server=utf8 --collation-server=utf8_general_ci"
healthcheck:
test: 'mysql --user=${OMRS_DB_USER:-openmrs} --password=${OMRS_DB_PASSWORD:-openmrs} --execute "SHOW DATABASES;"'
interval: 10s
timeout: 5s
retries: 5
environment:
MYSQL_DATABASE: openmrs
MYSQL_USER: ${OMRS_DB_USER:-openmrs}
MYSQL_PASSWORD: ${OMRS_DB_PASSWORD:-openmrs}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-openmrs}
volumes:
- ohri-db-data:/var/lib/mysql

volumes:
ohri-openmrs-data: ~
ohri-db-data: ~
Empty file added docker-compose.stack.yml
Empty file.

0 comments on commit d4dcb43

Please sign in to comment.