Using Firebase and Firestore with NextJS and Docker - Part 2 - Setup firebase in Next.js

On our previous post shows how to integrate firebase with docker. This article we will integrate Next.js with firebase, and then deploy app with Github actions. In this webapp, we can input cryptocurrency name, and upload logo, and therefore we use firestore to save Tokens collection and Cloud Storage to save logo images.

Read More  

Using Firebase and Firestore with NextJS and Docker - Part 1 - Setup firebase in docker

Last year, I got a case to use firebase and firestore with Next.js. I’ve been fullstack many years, so I haven’t tried to use firebase and firestore. There was a great chance to give it a try.

In this article I’ll show how to use firebase and firestore in Docker and Next.js. If you don’t have backend support, or you don’t want to build whole backend, database, and infrastructure, you would probably think this is a useful way.

Read More  

Hardhat - Solidity and NFT - Part 2 - Deploy contract and Mint NFT

我們上一篇已經設定好docker及hardhat專案,這一篇就從NFT開始。

Generate NFT metadata

先建立一個images資料夾後,把你想要的圖片放進去,並存成1, 2, 3….之類的檔名,然後用ipfs-car指令打包在一起。

找不到圖可以先用opensea doc裡的圖當練習

ipfs-car

接著到NFT Storage上傳images.car檔案就可以了。
image-car-upload

Read More  

Hardhat - Solidity and NFT - Part 1 - Prepare project

農曆年前結束了一個博弈業的案子,開啟了虛擬貨幣及區塊鏈的契機。年後,整個2月都在研究區塊鏈的各種應用,NFT、opensea、solidity、hardhat、ipfs、testnet,今天這篇文章來記錄一下我用Solidity / Hardhat上架NFT的過程,以免以後金魚腦忘光。

Prerequisite: Sign-up these services.

Init project

我是使用docker, docker-compose,所以先來看看我的初始專案架構及docker-compose.ymlDockerfile
Init project

docker-compose.yml

1
2
3
4
5
6
7
8
9
10
11
12
version: '3'

services:
hardhat:
build:
context: ./hardhat
dockerfile: Dockerfile.dev
volumes:
- ./hardhat:/app
- /app/node_modules
ports:
- 8545:8545

Read More  

Install Docker / Docker-compose on CentOS 8

新的一篇文章來講講最近踩的雷,起因手邊有個案子開了一台CentOS 8機器給我,讓我在上面設定docker跟跑起服務。實在跟CentOS很不熟的我決定寫篇備忘錄。

一開始就先開台乾淨的CentOS VM來準備被我玩爛…
install centos

Install Docker

然後,讓我慢慢安裝docker。

Read More