Merge 3710f3bd72
into 13386236e4
This commit is contained in:
commit
97460a0d74
|
@ -0,0 +1,7 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
FROM node:12-alpine
|
||||
RUN apk add --no-cache python g++ make
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN yarn install --production
|
||||
CMD ["node", "src/index.js"]
|
|
@ -52,8 +52,8 @@ function TodoListCard() {
|
|||
return (
|
||||
<React.Fragment>
|
||||
<AddItemForm onNewItem={onNewItem} />
|
||||
{items.length === 0 && (
|
||||
<p className="text-center">No items yet! Add one above!</p>
|
||||
{items.length === 0 && (
|
||||
<p className="text-center">You have no todo items yet! Add one above!</p>
|
||||
)}
|
||||
{items.map(item => (
|
||||
<ItemDisplay
|
||||
|
|
|
@ -1,12 +1,27 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
docs:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: dev
|
||||
app:
|
||||
image: node:12-alpine
|
||||
command: sh -c "yarn install && yarn run dev"
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 3000:3000
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./:/app
|
||||
environment:
|
||||
MYSQL_HOST: mysql
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: secret
|
||||
MYSQL_DB: todos
|
||||
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
volumes:
|
||||
- todo-mysql-data:/var/lib/mysql
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: secret
|
||||
MYSQL_DATABASE: todos
|
||||
|
||||
volumes:
|
||||
todo-mysql-data:
|
Loading…
Reference in New Issue