b58a42015d
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
version: "3.7"
|
|
services:
|
|
backend:
|
|
build:
|
|
args:
|
|
- NODE_ENV=development
|
|
context: backend
|
|
command: ../node_modules/.bin/nodemon --inspect=0.0.0.0:9229
|
|
environment:
|
|
- NODE_ENV=development
|
|
ports:
|
|
- 8080:80
|
|
- 9229:9229
|
|
- 9230:9230
|
|
volumes:
|
|
- ./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:
|
|
- db
|
|
db:
|
|
environment:
|
|
MYSQL_DATABASE: example
|
|
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db-password
|
|
image: mysql:8.0.19
|
|
restart: always
|
|
secrets:
|
|
- db-password
|
|
volumes:
|
|
- db-data:/var/lib/mysql
|
|
networks:
|
|
- private
|
|
frontend:
|
|
build:
|
|
context: frontend
|
|
target: development
|
|
ports:
|
|
- 9000:3000
|
|
volumes:
|
|
- ./frontend/src:/code/src
|
|
- /code/node_modules
|
|
networks:
|
|
- public
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
public: {}
|
|
private: {}
|
|
volumes:
|
|
back-notused: {}
|
|
db-data: {}
|
|
secrets:
|
|
db-password:
|
|
file: db/password.txt
|