Skip to content
Merged

Dev #77

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/mongo-docker-cd-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Mongo Development Docker Image CD

on:
push:
branches: [ dev ]
workflow_dispatch:

jobs:
mongo-docker-cd:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker meta data
id: docker-meta-data
uses: docker/metadata-action@v4
with:
images: codexrems/mongo
flavor: latest=false

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push mongo Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile.mongo
push: true
tags: codexrems/mongo:experimental
labels: ${{ steps.docker-meta-data.outputs.labels }}

44 changes: 44 additions & 0 deletions .github/workflows/mongo-docker-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Mongo Docker Image CD

on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
mongo-docker-cd:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta data
id: docker-meta-data
uses: docker/metadata-action@v4
with:
images: codexrems/mongo
flavor: latest=false

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Mongo Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile.mongo
push: true
tags: codexrems/mongo:latest
labels: ${{ steps.docker-meta-data.outputs.labels }}


19 changes: 19 additions & 0 deletions .github/workflows/mongo-docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mongo Docker Image CI

on:
pull_request:
branches: [ main, dev ]
workflow_dispatch:

jobs:
docker-ci:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: true

- name: Test Server Docker image Builds
run: docker build -f Dockerfile.mongo .
42 changes: 42 additions & 0 deletions .github/workflows/mongo-docker-tag-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Mongo Docker Tagged Image CD
on:
workflow_dispatch:
push:
tags:
- '*'

jobs:
docker:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker meta data
id: docker-meta-data
uses: docker/metadata-action@v4
with:
images: codexrems/mongo
flavor: latest=false

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
file: Dockerfile.mongo
tags: ${{ steps.docker-meta-data.outputs.tags }}
labels: ${{ steps.docker-meta-data.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
working-directory: ./rems-setup
env:
VSAC_API_KEY: ${{secrets.VSAC_API_KEY}}

- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.mongo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mongo:latest

ENV MONGO_INITDB_ROOT_USERNAME=mongo-user
ENV MONGO_INITDB_ROOT_PASSWORD=mongo-password
COPY ./mongo-init.js /docker-entrypoint-initdb.d/mongo-init.js
8 changes: 8 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ services:
ports:
- "8090:8090"
- "8091:8091"
- "9090:9090"
- "9091:9091"
environment:
VSAC_API_KEY: ${VSAC_API_KEY}
MONGO_URL: mongodb://rems-user:pass@pims_remsadmin_mongo:27017
Expand All @@ -118,12 +120,17 @@ services:
ports:
- "8095:8095"
- "8096:8096"
- "9095:9095"
- "9096:9096"
environment:
VSAC_API_KEY: ${VSAC_API_KEY}
MONGO_DB_NAME: remsadmin2
MONGO_URL: mongodb://rems-user2:pass@pims_remsadmin_mongo:27017
SERVER_NAME: 'CodeX REMS Administrator Prototype #2'
PORT: 8095
FRONTEND_PORT: 9095
AUTH_SERVER_URI: 'http://localhost:8095'
RESOURCE_SERVER: 'http://localhost:8095/'
volumes:
- rems_dev_rems-admin2-sync:/rems-admin2:nocopy # nocopy is important
- rems_dev_rems-admin2-nodeModules:/rems-admin2/node_modules
Expand Down Expand Up @@ -169,6 +176,7 @@ services:
REMS_ADMIN_FHIR_PATH: http://rems-administrator:8090/4_0_0
ports:
- "3003:3003"
- "9080:9080"
volumes:
- rems_dev_rems-intermediary-sync:/rems-intermediary:nocopy # nocopy is important
- rems_dev_rems-intermediary-nodeModules:/rems-intermediary/node_modules
Expand Down
8 changes: 8 additions & 0 deletions docker-compose-local-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ services:
ports:
- "8090:8090"
- "8091:8091"
- "9090:9090"
- "9091:9091"
environment:
VSAC_API_KEY: ${VSAC_API_KEY}
MONGO_URL: mongodb://rems-user:pass@pims_remsadmin_mongo:27017
Expand All @@ -94,12 +96,17 @@ services:
ports:
- "8095:8095"
- "8096:8096"
- "9095:9095"
- "9096:9096"
environment:
VSAC_API_KEY: ${VSAC_API_KEY}
MONGO_DB_NAME: remsadmin2
MONGO_URL: mongodb://rems-user2:pass@pims_remsadmin_mongo:27017
SERVER_NAME: 'CodeX REMS Administrator Prototype #2'
PORT: 8095
FRONTEND_PORT: 9095
AUTH_SERVER_URI: 'http://localhost:8095'
RESOURCE_SERVER: 'http://localhost:8095/'
depends_on:
pims_remsadmin_mongo:
condition: service_healthy
Expand Down Expand Up @@ -132,6 +139,7 @@ services:
REMS_ADMIN_FHIR_PATH: http://rems-administrator:8090/4_0_0
ports:
- "3003:3003"
- "9080:9080"
depends_on:
pims_remsadmin_mongo:
condition: service_healthy
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ services:
container_name: rems_prod_rems-administrator
ports: # Port binding to host from docker container
- "8090:8090"
- "9090:9090"
environment:
VSAC_API_KEY: ${VSAC_API_KEY}
MONGO_URL: mongodb://rems-user:pass@pims_remsadmin_mongo:27017
Expand All @@ -62,12 +63,16 @@ services:
container_name: rems_prod_rems-administrator2
ports: # Port binding to host from docker container
- "8095:8095"
- "9095:9095"
environment:
VSAC_API_KEY: ${VSAC_API_KEY}
MONGO_DB_NAME: remsadmin2
MONGO_URL: mongodb://rems-user2:pass@pims_remsadmin_mongo:27017
SERVER_NAME: 'CodeX REMS Administrator Prototype #2'
PORT: 8095
FRONTEND_PORT: 9095
AUTH_SERVER_URI: 'http://localhost:8095'
RESOURCE_SERVER: 'http://localhost:8095/'
depends_on:
pims_remsadmin_mongo:
condition: service_healthy
Expand Down Expand Up @@ -119,6 +124,7 @@ services:
REMS_ADMIN_FHIR_PATH: http://rems-administrator:8090/4_0_0
ports:
- "3003:3003"
- "9080:9080"
depends_on:
pims_remsadmin_mongo:
condition: service_healthy
Expand Down
6 changes: 3 additions & 3 deletions docker-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ syncs:

rems_dev_rems-admin-sync:
src: '../rems-admin'
sync_excludes: ['node_modules']
sync_excludes: ['node_modules', './frontend/node_modules']

rems_dev_rems-admin2-sync:
src: '../rems-admin'
sync_excludes: ['node_modules']
sync_excludes: ['node_modules', './frontend/node_modules']


rems_dev_pims-sync:
Expand All @@ -30,4 +30,4 @@ syncs:

rems_dev_rems-intermediary-sync:
src: '../rems-intermediary'
sync_excludes: ['node_modules']
sync_excludes: ['node_modules', './frontend/node_modules']
Loading