-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (51 loc) · 1.45 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (51 loc) · 1.45 KB
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
version: '3.7'
services:
webstore_node:
image: node:16.13.0
working_dir: /home/node/app
volumes:
- ./:/home/node/app
ports:
- 3666:3666
depends_on:
- webstore_database
- localstack
environment:
DB_HOST: 'webstore_database'
LOCALSTACK_HOST: 'localstack'
LOCALSTACK_PORT: '4566'
command: bash -c "yarn install && ./wait-for-it.sh -t 0 webstore_database:3306 -- yarn migrate && yarn seed && ./wait-for-it.sh -t 0 localstack:4566 -- yarn dev"
networks:
- webstore-network
webstore_database:
image: mysql:5.7.36
container_name: webstore_database
ports:
- 3307:3306
volumes:
- ./.db_data:/var/lib/mysql
environment:
MYSQL_DATABASE: 'webstore'
MYSQL_ROOT_PASSWORD: 'root'
networks:
- webstore-network
localstack:
# NOTE: Persistance is not available after version 0.13:https://docs.localstack.cloud/localstack/persistence-mechanism/
image: localstack/localstack:0.13.1
environment:
- EXTRA_CORS_ALLOWED_ORIGINS=*
- AWS_DEFAULT_REGION=us-east-1
- EDGE_PORT=4566
- SERVICES=lambda,s3
- DATA_DIR=${LOCALSTACK_DATA_DIR:-/tmp/localstack/data}
- LEGACY_PERSISTENCE=1
ports:
- '4566-4583:4566-4583'
volumes:
- './.localstack:/tmp/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
networks:
- webstore-network
networks:
webstore-network:
driver: bridge