2020-03-05 17:40:44 +00:00
|
|
|
version: "3.7"
|
|
|
|
services:
|
|
|
|
backend:
|
|
|
|
build:
|
|
|
|
args:
|
|
|
|
- NODE_ENV=development
|
|
|
|
context: backend
|
|
|
|
command: ../node_modules/.bin/nodemon --inspect=0.0.0.0:9229
|
|
|
|
environment:
|
2020-03-23 12:24:37 +00:00
|
|
|
- NODE_ENV=development
|
2020-03-05 17:40:44 +00:00
|
|
|
ports:
|
2020-03-23 12:24:37 +00:00
|
|
|
- 8080:80
|
|
|
|
- 9229:9229
|
|
|
|
- 9230:9230
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
2020-03-23 12:24:37 +00:00
|
|
|
- ./backend:/opt/app:delegated
|
|
|
|
- ./backend/package.json:/opt/package.json
|
|
|
|
- ./backend/package-lock.json:/opt/package-lock.json
|
|
|
|
- back-notused:/opt/app/node_modules
|
|
|
|
networks:
|
|
|
|
- public
|
|
|
|
- private
|
|
|
|
depends_on:
|
2020-03-05 17:40:44 +00:00
|
|
|
- db
|
|
|
|
db:
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: example
|
|
|
|
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db-password
|
2020-03-23 12:24:37 +00:00
|
|
|
image: mysql:8.0.19
|
2020-03-05 17:40:44 +00:00
|
|
|
restart: always
|
|
|
|
secrets:
|
2020-03-23 12:24:37 +00:00
|
|
|
- db-password
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
2020-03-23 12:24:37 +00:00
|
|
|
- db-data:/var/lib/mysql
|
|
|
|
networks:
|
|
|
|
- private
|
2020-03-05 17:40:44 +00:00
|
|
|
frontend:
|
2020-03-23 12:24:37 +00:00
|
|
|
build:
|
|
|
|
context: frontend
|
|
|
|
target: development
|
2020-03-05 17:40:44 +00:00
|
|
|
ports:
|
2020-03-23 12:24:37 +00:00
|
|
|
- 9000:3000
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
2020-03-23 12:24:37 +00:00
|
|
|
- ./frontend/src:/code/src
|
|
|
|
- /code/node_modules
|
|
|
|
networks:
|
|
|
|
- public
|
|
|
|
depends_on:
|
|
|
|
- backend
|
|
|
|
networks:
|
|
|
|
public: {}
|
|
|
|
private: {}
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
|
|
|
back-notused: {}
|
|
|
|
db-data: {}
|
|
|
|
secrets:
|
|
|
|
db-password:
|
|
|
|
file: db/password.txt
|