forked from OnurSerbes/mern-aws-fullstack-app
-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yml
70 lines (65 loc) · 1.38 KB
/
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
60
61
62
63
64
65
66
67
68
69
70
version: '3.8'
services:
server:
build:
context: ./server
dockerfile: Dockerfile
ports:
- 5000:5000
depends_on:
- localstack
- mongo
dns:
- 10.0.2.20
environment:
- MONGODB_URI=mongodb://mongo:27017/todo-app
- JWT_SECRET=
- AWS_ENDPOINT=http://host.docker.internal:4567
- AWS_ACCESS_KEY_ID=
- AWS_SECRET_ACCESS_KEY=
- AWS_REGION=us-east-1
- S3_BUCKET_NAME=sample-bucket
networks:
- localnet
client:
build:
context: ./client
dockerfile: Dockerfile
ports:
- 3000:3000
depends_on:
- server
environment:
- REACT_APP_API_URL=http://server:5000/api
networks:
- localnet
mongo:
image: mongo
volumes:
- mongo-data:/data/db
ports:
- "27018:27017"
networks:
- localnet
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
image: localstack/localstack
ports:
- "127.0.0.1:4567:4566"
- "127.0.0.1:4510-4559:4510-4559"
environment:
- DEBUG=${DEBUG:-0}
- SERVICES=s3
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
localnet:
ipv4_address: 10.0.2.20
volumes:
mongo-data:
networks:
localnet:
ipam:
config:
- subnet: 10.0.2.0/24