services:
app:
container_name: app-test
image: nextjs:latest-230818
build:
context: ./next-docker-test
depends_on:
- mysql
ports:
- "3000:3000"
mysql:
container_name: mysql-test
platform: linux/x86_64
image: mysql:8.0.34
restart: always
ports:
- 3306:3306
volumes:
- ./next-docker-test/src/mysql/init.d:/docker-entrypoint-initdb.d
depends_on:
- selenium-hub
environment:
- MYSQL_DATABASE=cocktailsdb
- MYSQL_ROOT_PASSWORD=sorksnrnrp
docker-compose up -d
or
docker-compose up build --force-recreate -d
docker-compose exec -it [컨테이너 id] /bin/bash
mysql -u root -p --port [port번호] < create_item_table.sql