Skip to content

Commit

Permalink
feat(sso-auth): Implemented the SSO Auth in the header component (SSI) (
Browse files Browse the repository at this point in the history
#320)

* Implemented SSO auth and the user-profile drawer

Also,
* integrated App Drawer with the Home Service API for getHomeTypeBy
* fixed some dependencies upgrades
* updated the docker-compose.yml

* Updated README with steps to use docker-compose

* Fixed the incorrect property name for app url

Also,
* added persistent volume for the mongo container
* removed some debugging code
  • Loading branch information
deshmukhmayur authored May 19, 2020
1 parent 1c94bd8 commit f7b8aaf
Show file tree
Hide file tree
Showing 13 changed files with 6,725 additions and 6,284 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ typings/

# next.js build output
.next

# Temporary files
tmp/
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,45 @@ An integrated application hosting platform which allows you to host your SPAs. I

```bash
npm install
# OR
lerna bootstrap
```

## Using docker-compose for local development

To start the local environment setup using docker-compose, use the following cli command from the root of this project:

```bash
docker-compose up $service_name
```

This will start the service along with any dependent services/databases required for the service (for eg. mongo).

_Note:_ The service name should match the service labels given the the [docker-compose.yml](./docker-compose.yml) in the root directory.

### Personal MongoDB instance using Docker Compose

You can also use docker-compose as a personal MongoDB instance. Just uncomment the ports in the [docker-compose.yml](./docker-compose.yml) file.

```yml
services:
...
mongo:
...
ports:
- <local_port>:27017
```
You can replace the local port with any available port on your machine. I would recommend to not use the same `27017` port for your local, as that might cause conflicts with your local installation of MongoDB.

After that, just start the service:

```bash
docker-compose up mongo
```

This will start a MongoDB container instance, which can be access using localhost via the port mentioned in the docker-compose.

## Run tests

```bash
Expand Down
55 changes: 49 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- ./packages/ssi-service/dist:/var/www/html/templates
- ./packages/ssi-service/public/index.html:/usr/share/httpd/noindex/index.html
ports:
- 5000:8080
- 4200:8080

home-spa:
build: ./packages/home-spa
Expand All @@ -17,25 +17,68 @@ services:
- 5500:8080
depends_on:
- home-service

home-service:
build: ./packages/home-service
command: npm start
env_file: ./packages/home-service/.env
environment:
DB_PATH: mongo
volumes:
- ./packages/home-service:/app
ports:
- 8081:8080
depends_on:
- mongo

feedback-service:
build: ./packages/feedback-service
command: npm start
env_file: ./packages/feedback-service/.env
environment:
DB_PATH: mongo
volumes:
- ./packages/feedback-service:/app
ports:
- 5501:8080
- 8082:8080
depends_on:
- mongo

user-service:
build: ./packages/user-service
command: npm start
env_file: ./packages/user-service/.env
environment:
DB_PATH: mongo
volumes:
- ./packages/user-service:/app
ports:
- 8080:8080
- 8083:8080
depends_on:
- mongo

# notifications-service:
# build: ./packages/notifications-service
# command: npm start
# env_file: ./packages/notifications-service/.env
# environment:
# DB_PATH: mongo
# volumes:
# - ./packages/notifications-service:/app
# ports:
# - 8084:8080
# depends_on:
# - mongo

mongo:
image: mongo:4
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
logging:
driver: none
volumes:
- ./tmp/db:/data/db
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: example
# ports:
# - 37017:27017
3 changes: 1 addition & 2 deletions packages/ssi-service/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ module.exports = {
// snapshotSerializers: [],

// The test environment that will be used for testing
// WKRD: Using jsdom-sixteen as it has support for customElements()
testEnvironment: "jest-environment-jsdom-sixteen",
// testEnvironment: "jest-environment-jsdom",

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
Expand Down
Loading

0 comments on commit f7b8aaf

Please sign in to comment.