Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 5711f0e

Browse files
authored
Merge pull request #1708 from atharva3010/#1635
#1635 FEAT: Set Docker image building process
2 parents 38b5b66 + 7579eb2 commit 5711f0e

File tree

5 files changed

+38
-47
lines changed

5 files changed

+38
-47
lines changed

.dockerignore

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
.nuxt
21
node_modules
32
npm-debug.log
4-
Dockerfile*
5-
docker-compose*
6-
.dockerignore
7-
.git
8-
.gitignore
9-
README.md
10-
LICENSE
3+
.nuxt
114
.vscode

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Dockerfile
22
FROM node:lts
33

4-
WORKDIR /kodadot-app
4+
WORKDIR /app
55

6-
EXPOSE 9090
7-
8-
COPY package.json /kodadot-app/package.json
6+
COPY package.json .
7+
COPY yarn.lock .
98

109
RUN yarn install
11-
RUN yarn build
1210

13-
ENV NUXT_HOST=0.0.0.0
14-
ENV NUXT_PORT=9090
11+
COPY . .
12+
13+
ENV HOST 0.0.0.0
14+
EXPOSE 9090
1515

1616
CMD [ "yarn", "dev" ]

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Thank to [contributors-img](https://contrib.rocks).
9696

9797
We are using `yarn` workspace, as installing things via npm **will result in broken dependencies.**
9898

99-
## Play-🕹
99+
## Play-🕹
100100

101101
```shell
102102
git clone [email protected]:kodadot/nft-gallery.git
@@ -105,7 +105,7 @@ yarn dev
105105
open http://localhost:9090/
106106
```
107107

108-
## I want to contribute- 🙋‍
108+
## I want to contribute- 🙋‍
109109

110110
Sure, your **contribution** is more than welcome. Please follow [code of conduct](CODE_OF_CONDUCT.md) and **[contribution guidelines](CONTRIBUTING.md)**
111111

@@ -126,36 +126,34 @@ We have list of frequent participants in our codebase.
126126
- Want to be on this list? Become frequent participant by contributing more, [come with us](https://open.spotify.com/track/5kTBiVnjq9xKmZL9dNs8zL?si=9fc60b8b87764969)!
127127
- [You can learn about our Contributors base](https://github.com/kodadot/nft-gallery/graphs/contributors)
128128

129-
## Docker-🐳
129+
## Docker-🐳
130130
If you just want to try out our KodaDot on Kusama and have a full local setup with a local node, we assume you have [docker](https://docs.docker.com/get-docker/) and docker-compose installed.
131131

132-
Run Kodadot locally
133-
```bash
134-
docker-compose up -d --build
135-
```
132+
- ### First time setup
136133

137-
Build docker image of KodaDot
138-
```bash
139-
docker build . -t kodadot-app
140-
```
134+
- Build the docker image
141135

142-
Check if container is up
143-
```bash
144-
docker ps
145-
```
136+
```bash
137+
# Make sure you are logged into docker.
146138

147-
Run it locally and then visit `localhost:9090`
148-
```bash
149-
docker run -p 9090:9090 --name kodadot kodadot-app
150-
```
139+
docker-compose up --build
140+
```
151141

152-
Someone clean it pls, bounty for devops https://github.com/kodadot/nft-gallery/issues/1635
153-
```
154-
docker build -t nuxtapp .
155-
docker run -it -p 0.0.0.0:9090:9090 nuxtapp
156-
```
157-
then go to the http://0.0.0.0:9090
142+
- To check if container is up:
143+
```bash
144+
docker ps
145+
```
146+
147+
- ### From next time
148+
149+
Simply run:
150+
151+
```bash
152+
docker-compose up
153+
```
158154

155+
Voila! KodaDot will be available at [localhost:9090](http://localhost:9090).
156+
KodaDot supports Hot Module Replacement on docker as well, any changes made will take effect immediately.
159157

160158
## Dev hints
161159

docker-compose.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3.7'
1+
version: "3.8"
22

33
services:
44
frontend:
@@ -7,9 +7,8 @@ services:
77
context: .
88
dockerfile: Dockerfile
99
volumes:
10-
- '.:/kodadot-app'
11-
- '/kodadot-app/node_modules'
10+
- ./:/app
11+
command: yarn dev
1212
ports:
13-
- '0.0.0.0:9090:9090'
14-
environment:
15-
- CHOKIDAR_USEPOLLING=true
13+
- "9090:9090"
14+
env_file: .env

nuxt.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ export default {
192192

193193
watchers: {
194194
webpack: {
195-
poll: true
195+
aggregateTimeout: 300,
196+
poll: 1000,
196197
}
197198
},
198199
// env: {

0 commit comments

Comments
 (0)