Skip to content
Open
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
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:12.18.2-buster

WORKDIR /user/src/smart-brain-api

COPY ./ ./

RUN npm install

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion controllers/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Clarifai = require('clarifai');

//You must add your own API key here from Clarifai.
const app = new Clarifai.App({
apiKey: 'YOUR_API_KEY_HERE'
apiKey: '1947bf106f5c4c3aaa8f9a7f043007b8'
});

const handleApiCall = (req, res) => {
Expand Down
29 changes: 29 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3.8'

services:
# Backend API
smart-brain-api:
container_name: backend
build:
context: .
dockerfile: Dockerfile
command: npm start
working_dir: /user/src/smart-brain-api
environment:
POSTGRES_URI: postgres://sally:secret@postgres:5432/smart-brain-docker
links:
- postgres
ports:
- "9000:9000"
volumes:
- ./://user/src/smart-brain-api
# Postgres
postgres:
environment:
POSTGRES_USER: sally
POSTGRES_PASSWORD: secret
POSTGRES_DB: smart-brain-docker
POSTGRES_HOST: postgres
build: ./postgres
ports:
- "5432:5432"
Loading