Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ ENV PORT 3000
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"

CMD ["node", "server.js"]
CMD ["node", "server.js"]
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Parents can activate full-access mode, enabling children to withdraw funds for u
- Next.js powers the user-friendly frontend.
- Solidity development using Forge.


## 🚀 Local Development Setup

Copy the `.env.example` to `.env` and populate the values.
Expand All @@ -53,15 +52,16 @@ Copy the `.env.example` to `.env` and populate the values.
```sh
yarn run dev
```

## 🐳 Docker Prerequisites

Install [Docker Desktop](https://docs.docker.com/get-docker/) for Mac, Windows, or Linux. Docker Desktop includes Docker Compose as part of the installation.

- Development - simply run this command to build the production container

```sh
yarn docker
```
```sh
yarn docker-build
```

- Open `localhost:3000` in your browser

Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.8"
services:
app:
container_name: defikids-dapp
image: node:18-alpine
command: sh -c "cd app && yarn install && yarn run dev"
ports:
- 127.0.0.1:3000:3000
working_dir: /app
restart: always
volumes:
- ./:/app
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"start": "next start",
"lint": "next lint",
"prepare": "husky install",
"docker": "docker build -t defikids-dapp . && docker run -p 3000:3000 defikids-dapp"
"docker-build": "docker build -t defikids-dapp . && docker run -p 3000:3000 defikids-dapp",
"docker-start": "docker run -p 3000:3000 defikids-dapp"
},
"dependencies": {
"@chakra-ui/icons": "^2.1.0",
Expand Down
Loading