diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index f6583ff37..000000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -app/Dockerfile \ No newline at end of file diff --git a/app/.dockerignore b/app/.dockerignore new file mode 100644 index 000000000..e69de29bb diff --git a/app/docker-compose.yml b/app/docker-compose.yml new file mode 100644 index 000000000..6949c7000 --- /dev/null +++ b/app/docker-compose.yml @@ -0,0 +1,25 @@ +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: diff --git a/app/src/static/index.html b/app/src/static/index.html index 3f6fb5be0..84e16f575 100644 --- a/app/src/static/index.html +++ b/app/src/static/index.html @@ -8,7 +8,7 @@ -