-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
57 lines (51 loc) · 1.45 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: '3.8'
services:
# PostgreSQL
postgres:
container_name: postgres
build: ./smartbrain/server/postgres
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
POSTGRES_URL: postgres://admin:password@localhost:5432/smart-brain
POSTGRES_DB: smart-brain
POSTGRES_HOST: postgres
ports:
- "5432:5432"
# Redis
redis:
container_name: redis
image: redis
ports:
- "6379:6379"
# Backend Server
smartbrain-server:
# env_file:
# - ./.private/api-keys.env "Another way to insert env variables"
container_name: server
build: ./smartbrain/server/
volumes:
- ./smartbrain/server/:/smartbrain/server
command: npm start
working_dir: /smartbrain/server
ports:
- "3001:3001"
environment:
POSTGRES_URI: postgres://admin:password@postgres:5432/smart-brain
REDIS_URI: redis://redis:6379
# Frontend Client
smartbrain-client:
# env_file:
# - ./.private/api-keys.env "Another way to insert env variables"
container_name: client
build: ./smartbrain/client/
volumes:
- ./smartbrain/client/:/smartbrain/client
command: npm start
working_dir: /smartbrain/client
ports:
- "3000:3000"
# Heads up! Docker has updated this feature and now you don't need to define the links property in order for things to work - https://docs.docker.com/compose/networking/
# links:
# - postgres
# - redis