-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
44 lines (42 loc) · 1.04 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
version: '2.1'
services:
database:
image: 'mysql:5.7'
container_name: dev.api.db
environment:
MYSQL_ROOT_PASSWORD: sam
MYSQL_DATABASE: sam
MYSQL_USER: sam
MYSQL_PASSWORD: sam
ports:
- '3308:3306'
networks:
- net_api
healthcheck:
test: '/usr/bin/mysql --user=sam --password=sam --execute "SHOW DATABASES;"'
interval: 5s
timeout: 20s
retries: 10
aws-sam-local:
image: cnadiminti/aws-sam-local
command: 'local start-api --docker-volume-basedir "$PWD/" --host 0.0.0.0 --docker-network sam-docker-mysql_net_api --template template.dev.yml'
ports:
- '3000:3000'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- './:/var/opt'
environment:
- 'DEBUG=sam-docker-api:*'
container_name: dev.api
depends_on:
database:
condition: service_healthy
links:
- 'database:db.master.local'
networks:
net_api:
driver: bridge
ipam:
config:
- subnet: 172.201.1.0/24
gateway: 172.201.1.1