Docker compose demo

 ---

version: "3.8"
services:
nodejs-app:
build: ./frontend
depends_on:
- backend
ports:
- protocol: tcp
published: 80
target: 8000
restart: always
volumes:
- /app/frontend:/app
- /app/node_modules
networks:
- front-internal
command: npm run start
python-app:
build: ./backend
depends_on:
- database
restart: always
ports:
- protocol: udp
published: 8001
target: 8001


mysql:
image: mysql:5.7
ports:
- 3306:3306
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --explicit_defaults_for_timestamp
volumes:
- ./database:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_ROOT_USER: changeme

networks:
front-internal:
driver: bridge

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch