-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (55 loc) · 1.37 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
58
59
version: '3'
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: ${NODE_ENV}
image: simple_blog_frontend:${NODE_ENV}
ports:
- ${FRONTEND_PORT}:${FRONTEND_PORT}
environment:
- NODE_ENV=${NODE_ENV}
- API_URL=${API_URL}
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: ${NODE_ENV}
image: simple_blog_backend:${NODE_ENV}
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
environment:
- NODE_ENV=${NODE_ENV}
- FRONTEND_URL=${FRONTEND_URL}
- DATABASE_URL=${DATABASE_URL}
- JWT_SECRET=${JWT_SECRET}
- JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET}
- AWS_REGION=${AWS_REGION}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_MAIL_SENDER=${AWS_MAIL_SENDER}
- AWS_BUCKET_NAME=${AWS_BUCKET_NAME}
volumes:
- ./backend:/app
- /app/node_modules
depends_on:
- db
db:
image: postgres
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
default:
driver: bridge
volumes:
postgres-data: