Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microservices #214

Closed
wants to merge 4 commits into from
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ venv/
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
set_env.sh
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ Launch the backend API locally. The API is the application's interface to S3 and
### 4. Frontend App
Launch the frontend app locally.

> Make sure you run following commands with node 16 version.


* To download all the package dependencies, run the command from the directory `udagram-frontend/`:
```bash
npm install .
Expand Down
20 changes: 20 additions & 0 deletions docker-compose-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3"
services:
reverseproxy:
build:
context: ./udagram-reverseproxy
image: reverseproxy
backend_user:
build:
context: ./udagram-api-user
image: udagram-api-user
backend_feed:
build:
context: ./udagram-api-feed
image: udagram-api-feed
frontend:
build:
context: ./udagram-frontend
platforms:
- "linux/amd64"
image: udagram-frontend:local
41 changes: 41 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: "3"
services:
reverseproxy:
image: reverseproxy
ports:
- 8080:8080
restart: always
depends_on:
- backend-user
- backend-feed
backend-user:
image: udagram-api-user
environment:
POSTGRES_USERNAME: $POSTGRES_USERNAME
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
POSTGRES_HOST: $POSTGRES_HOST
AWS_REGION: $AWS_REGION
AWS_PROFILE: $AWS_PROFILE
AWS_BUCKET: $AWS_BUCKET
JWT_SECRET: $JWT_SECRET
URL: "http://localhost:8100"
backend-feed:
image: udagram-api-feed
volumes:
- $HOME/.aws:/root/.aws
environment:
POSTGRES_USERNAME: $POSTGRES_USERNAME
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
POSTGRES_HOST: $POSTGRES_HOST
AWS_REGION: $AWS_REGION
AWS_PROFILE: $AWS_PROFILE
AWS_BUCKET: $AWS_BUCKET
JWT_SECRET: $JWT_SECRET
URL: "http://localhost:8100"
frontend:
image: udagram-frontend:local
platform: linux/amd64
ports:
- "8100:80"
11 changes: 0 additions & 11 deletions set_env.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions udagram-api-feed/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:16
## Create app directory
WORKDIR /usr/src/app
## Install app dependencies
## A wildcard is used to ensure both package.json AND package-lock.json are copied where available (npm@5+)
COPY package*.json ./
RUN npm ci
## Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm", "run", "prod" ]
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Loading