diff --git a/app/docker-compose.yml b/app/docker-compose.yml new file mode 100644 index 0000000..e41dde6 --- /dev/null +++ b/app/docker-compose.yml @@ -0,0 +1,31 @@ + + +services: + app: + image: node:18-alpine + command: sh -c "yarn install && yarn run dev" + ports: + - 3000:3000 + working_dir: /app + volumes: + - ./:/app + environment: + MYSQL_HOST: mysql + MYSQL_USER: root + MYSQL_PASSWORD: secret + MYSQL_DB: todos + + mysql: + image: mysql:8.0 + volumes: + - todo-mysql-data:/var/lib/mysql + environment: + MYSQL_ROOT_PASSWORD: secret + MYSQL_DATABASE: todos + +volumes: + todo-mysql-data: + +networks: + default: + name: todo-mysql-network \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +