-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
64 lines (59 loc) · 1.39 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
60
61
62
63
64
version: "3.8"
services:
localstack:
# https://medium.com/@muthomititus/a-guide-to-localstack-with-docker-compose-e1487e3a776f
image: localstack/localstack:1.0.4
container_name: econominhas-localstack
ports:
- "4566:4566"
environment:
- SERVICES=s3:4566
- HOSTNAME=localstack
- HOSTNAME_EXTERNAL=localstack
- DEFAULT_REGION=us-east-1
volumes:
- "./localstack/buckets.sh:/docker-entrypoint-initaws.d/buckets.sh"
networks:
- econominhas-api_network
postgres:
image: "postgres:latest"
container_name: econominhas-postgres
ports:
- 5432:5432
environment:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
POSTGRES_DB: database
volumes:
- "postgres:/var/lib/postgresql/data/"
networks:
- econominhas-api_network
api:
build:
context: "."
dockerfile: Dockerfile.dev
image: econominhas-api
container_name: econominhas-api
command: npm run start:docker
depends_on:
- postgres
- localstack
ports:
- 3000:3000
env_file:
- .env.docker
volumes:
- ./:/app
- /node_modules
networks:
- econominhas-api_network
volumes:
postgres:
networks:
econominhas-api_network:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
ip_range: 172.28.5.0/24
gateway: 172.28.5.254