-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (39 loc) · 1.36 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
services:
utxo-management-server:
build:
context: .
dockerfile: Dockerfile
container_name: utxo-management-server
restart: always
ports:
- "8080:8080" # Map host:8080 to container:8080 (Node server)
# volumes:
# Optional: mount your local code so changes reflect without rebuilding
# - .:/app
# If you do volume-mount your source code, be careful not to overwrite /app/node_modules
# e.g. add a named volume for node_modules or rely on "npm install" inside container.
environment:
NODE_ENV: development
HTTP_PORT: "8080"
SERVER_PRIVATE_KEY: "bffe0d7a3f7effce2b3511323c6cca1df1649e41a336a8b603194d53287ad285" # This is a throwaway test key
# Fill in the DB credentials as a JSON object or direct URL
KNEX_DB_CONNECTION: '{"host":"mysql","user":"root","password":"rootPass","database":"wallet_storage","port":3306}'
depends_on:
- mysql # ensures MySQL starts before the Node service tries to connect
mysql:
image: mysql:8
container_name: mysql
environment:
MYSQL_DATABASE: wallet_storage
MYSQL_ROOT_PASSWORD: rootPass
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 3
volumes:
mysql_data: