You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
YAML
60 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:
|
|
- 80: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:
|
|
image: mysql:8.0.19
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
|
restart: always
|
|
secrets:
|
|
- db-password
|
|
volumes:
|
|
- db-data:/var/lib/mysql
|
|
networks:
|
|
- private
|
|
environment:
|
|
- MYSQL_DATABASE=example
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
|
|
frontend:
|
|
build:
|
|
context: frontend
|
|
target: development
|
|
ports:
|
|
- 3000: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
|