Skip to content

Commit

Permalink
UPDATE: dockerfile configs
Browse files Browse the repository at this point in the history
  • Loading branch information
aatalrashid committed Jan 4, 2024
1 parent 1203bb5 commit 3917325
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
**/node_modules
**/.next
**/dist
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ Allow users to register and set their delivery preferences, including frequency
Design an algorithm that matches businesses with suitable suppliers based on their specified requirements.

### Delivery Process


## DevOps

### Run the apps locally with Docker

```
docker compose build [SERVICE] eg. sahilwebsite
```

```
docker compose up -d sahilwebsite
```
22 changes: 17 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
version: '3'

services:
api:
container_name: api
# Website
sahilwebsite:
container_name: sahil-website
build:
context: .
dockerfile: ./docker/Dockerfile-api
image: api
dockerfile: ./infra/docker/Dockerfile.website
image: sahil-website
restart: always
ports:
- '3000:3000'

# API
sahilapi:
container_name: sahil-api
build:
context: .
dockerfile: ./infra/docker/Dockerfile.api
image: sahil-api
restart: always
depends_on: [database]
ports:
- '3001:3000'
- '3001:3001'

database:
container_name: database
Expand Down
4 changes: 4 additions & 0 deletions infra/docker/Dockerfile-agent
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG NODE_VERSION=18
ARG ALPINE_VERSION=3.15

FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS builder
4 changes: 4 additions & 0 deletions infra/docker/Dockerfile-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG NODE_VERSION=18
ARG ALPINE_VERSION=3.15

FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS builder
4 changes: 4 additions & 0 deletions infra/docker/Dockerfile-maps
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG NODE_VERSION=18
ARG ALPINE_VERSION=3.15

FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS builder
4 changes: 4 additions & 0 deletions infra/docker/Dockerfile-pay
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG NODE_VERSION=18
ARG ALPINE_VERSION=3.15

FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS builder

0 comments on commit 3917325

Please sign in to comment.