Deploy Full stack docker image (#914)
This commit is contained in:
@@ -8,14 +8,45 @@ This guide will help you setup the full stack app on your local machine.
|
|||||||
|
|
||||||
### 🐳 Docker Setup
|
### 🐳 Docker Setup
|
||||||
|
|
||||||
- To setup full stack app using docker, run the following command inside this folder using your terminal.
|
- Create a `docker-compose.yml` file and paste the following code in it.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
container_name: embedchain-backend
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: backend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: embedchain/backend
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
container_name: embedchain-frontend
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: frontend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: embedchain/frontend
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
depends_on:
|
||||||
|
- "backend"
|
||||||
|
```
|
||||||
|
|
||||||
|
- Run the following command,
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up --build
|
docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
📝 Note: The build command might take a while to install all the packages depending on your system resources.
|
📝 Note: The build command might take a while to install all the packages depending on your system resources.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### 🚀 Usage Instructions
|
### 🚀 Usage Instructions
|
||||||
|
|
||||||
- Go to [http://localhost:3000/](http://localhost:3000/) in your browser to view the dashboard.
|
- Go to [http://localhost:3000/](http://localhost:3000/) in your browser to view the dashboard.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.11 AS backend
|
FROM python:3.11-slim AS backend
|
||||||
|
|
||||||
WORKDIR /usr/src/app/backend
|
WORKDIR /usr/src/app/backend
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|||||||
@@ -2,20 +2,22 @@ version: "3.9"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
container_name: embedchain_backend
|
container_name: embedchain-backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: backend
|
context: backend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
image: embedchain/backend
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
container_name: embedchain_frontend
|
container_name: embedchain-frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: frontend
|
context: frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
image: embedchain/frontend
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM node:18 AS frontend
|
FROM node:18-slim AS frontend
|
||||||
|
|
||||||
WORKDIR /usr/src/app/frontend
|
WORKDIR /usr/src/app/frontend
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
|
|||||||
Reference in New Issue
Block a user