-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated docker, fixed tests for docker
- Loading branch information
Showing
14 changed files
with
685 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build and Publish Docker Image | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'Seed-Test_v*' | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Get Tag Name | ||
id: get_tag_name | ||
run: | | ||
version=$(echo $GITHUB_REF | sed 's/refs\/tags\///' | sed 's/.*_//') | ||
echo "version=${version}" >> ${GITHUB_OUTPUT} | ||
# BACKEND | ||
- name: Build Docker Image | ||
run: docker build -t seed-test-backend:${{ steps.get_tag_name.outputs.version }} ./backend | ||
|
||
- name: Tag Docker Image as Latest | ||
run: | | ||
docker tag seed-test-backend:${{ steps.get_tag_name.outputs.version }} ${{ secrets.DOCKER_USERNAME }}/seed-test-backend:${{ steps.get_tag_name.outputs.version }} | ||
docker tag seed-test-backend:${{ steps.get_tag_name.outputs.version }} ${{ secrets.DOCKER_USERNAME }}/seed-test-backend:latest | ||
- name: Push Docker Image to Docker Hub | ||
run: | | ||
docker push ${{ secrets.DOCKER_USERNAME }}/seed-test-backend:${{ steps.get_tag_name.outputs.version }} | ||
docker push ${{ secrets.DOCKER_USERNAME }}/seed-test-backend:latest | ||
# FRONTEND | ||
- name: Build Docker Image | ||
run: docker build -t seed-test-frontend:${{ steps.get_tag_name.outputs.version }} ./frontend | ||
|
||
- name: Tag Docker Image as Latest | ||
run: | | ||
docker tag seed-test-frontend:${{ steps.get_tag_name.outputs.version }} ${{ secrets.DOCKER_USERNAME }}/seed-test-frontend:${{ steps.get_tag_name.outputs.version }} | ||
docker tag seed-test-frontend:${{ steps.get_tag_name.outputs.version }} ${{ secrets.DOCKER_USERNAME }}/seed-test-frontend:latest | ||
- name: Push Docker Image to Docker Hub | ||
run: | | ||
docker push ${{ secrets.DOCKER_USERNAME }}/seed-test-frontend:${{ steps.get_tag_name.outputs.version }} | ||
docker push ${{ secrets.DOCKER_USERNAME }}/seed-test-frontend:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('dotenv').config(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
version: "2.12" | ||
|
||
services: | ||
|
||
seedmongodb: | ||
container_name: "Seed-MongoDB" | ||
image: mongo | ||
|
@@ -15,36 +14,44 @@ services: | |
- MONGO_INITDB_ROOT_PASSWORD=SeedTest | ||
- MONGO_INITDB_DATABASE=Seed | ||
restart: always | ||
|
||
backend: | ||
build: | ||
context: ./backend | ||
dockerfile: Dockerfile | ||
args: | ||
- BUILD_DATE=${BUILD_DATE:-$$(date -u +"%Y-%m-%dT%H:%M:%SZ")} | ||
- VCS_REF=${VCS_REF:-$$(git rev-parse --short HEAD)} | ||
- IMAGE_NAME=seed-test-backend:latest | ||
image: seed-test-backend:latest | ||
image: seedtest/seed-test-backend:latest | ||
ports: | ||
- "${BACKENDPORT}:${BACKENDPORT}" | ||
- "8080:8080" | ||
container_name: "Seed-backend" | ||
depends_on: | ||
- seedmongodb | ||
restart: always | ||
|
||
environment: | ||
DATABASE_URI: mongodb://SeedAdmin:SeedTest@seedmongodb:27017 | ||
Check failure Code scanning / SonarCloud MongoDB database passwords should not be disclosed Critical
Make sure this MongoDB database password gets changed and removed from the code. See more on SonarCloud
|
||
REPORT_DELETION_TIME: 5 | ||
TESTACCOUNT_NAME: | ||
TESTACCOUNT_REPO: | ||
TESTACCOUNT_TOKEN: | ||
SESSION_SECRET: 'secretSessionKey' | ||
JIRA_SECRET: 'secretJiraKey' | ||
JIRA_SALT: 'BJ1yJTJ7AFql' | ||
EMAIL_AUTH: | ||
EMAIL_PW: | ||
EMAIL_PORT: | ||
EMAIL_HOST: | ||
GITHUB_CLIENT_SECRET: | ||
GITHUB_CLIENT_ID: | ||
PASSPORT_GITHUB_LOCAL_PW_FIELD: 'id' | ||
MAX_SAVED_REPORTS: | ||
|
||
frontend: | ||
build: | ||
context: ./frontend | ||
dockerfile: Dockerfile | ||
args: | ||
- BUILD_DATE=${BUILD_DATE:-$$(date -u +"%Y-%m-%dT%H:%M:%SZ")} | ||
- VCS_REF=${VCS_REF:-$$(git rev-parse --short HEAD)} | ||
- IMAGE_NAME=seed-test-frontend:latest | ||
image: seed-test-frontend:latest | ||
image: seedtest/seed-test-frontend:latest | ||
ports: | ||
- "${FRONTENDPORT}:${FRONTENDPORT}" | ||
- "4200:4200" | ||
container_name: "Seed-frontend" | ||
depends_on: | ||
- backend | ||
restart: always | ||
environment: | ||
GITHUB_CLIENT_ID: | ||
VERSION: | ||
|
||
volumes: | ||
seedDB: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: "2.12" | ||
|
||
services: | ||
backend: | ||
build: | ||
context: ./backend | ||
dockerfile: Dockerfile | ||
ports: | ||
- 8080:8080 | ||
container_name: "Seed-backend" | ||
restart: always | ||
|
||
frontend: | ||
build: | ||
context: ./frontend | ||
dockerfile: Dockerfile | ||
image: seed-test-frontend:latest | ||
ports: | ||
- 4200:4200 | ||
container_name: "Seed-frontend" | ||
depends_on: | ||
- backend | ||
restart: always |
Oops, something went wrong.