-
-
Notifications
You must be signed in to change notification settings - Fork 366
#1635 FEAT: Set Docker image building process #1708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
.nuxt | ||
node_modules | ||
npm-debug.log | ||
Dockerfile* | ||
docker-compose* | ||
.dockerignore | ||
.git | ||
.gitignore | ||
README.md | ||
LICENSE | ||
.nuxt | ||
.vscode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# Dockerfile | ||
FROM node:lts | ||
|
||
WORKDIR /kodadot-app | ||
WORKDIR /app | ||
|
||
EXPOSE 9090 | ||
|
||
COPY package.json /kodadot-app/package.json | ||
COPY package.json . | ||
COPY yarn.lock . | ||
|
||
RUN yarn install | ||
RUN yarn build | ||
|
||
ENV NUXT_HOST=0.0.0.0 | ||
ENV NUXT_PORT=9090 | ||
COPY . . | ||
|
||
ENV HOST 0.0.0.0 | ||
EXPOSE 9090 | ||
|
||
CMD [ "yarn", "dev" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,7 @@ Thank to [contributors-img](https://contrib.rocks). | |
|
||
We are using `yarn` workspace, as installing things via npm **will result in broken dependencies.** | ||
|
||
## Play-🕹 | ||
## Play-🕹 | ||
|
||
```shell | ||
git clone [email protected]:kodadot/nft-gallery.git | ||
|
@@ -105,7 +105,7 @@ yarn dev | |
open http://localhost:9090/ | ||
``` | ||
|
||
## I want to contribute- 🙋 | ||
## I want to contribute- 🙋 | ||
|
||
Sure, your **contribution** is more than welcome. Please follow [code of conduct](CODE_OF_CONDUCT.md) and **[contribution guidelines](CONTRIBUTING.md)** | ||
|
||
|
@@ -126,36 +126,34 @@ We have list of frequent participants in our codebase. | |
- Want to be on this list? Become frequent participant by contributing more, [come with us](https://open.spotify.com/track/5kTBiVnjq9xKmZL9dNs8zL?si=9fc60b8b87764969)! | ||
- [You can learn about our Contributors base](https://github.com/kodadot/nft-gallery/graphs/contributors) | ||
|
||
## Docker-🐳 | ||
## Docker-🐳 | ||
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. | ||
|
||
Run Kodadot locally | ||
```bash | ||
docker-compose up -d --build | ||
``` | ||
- ### First time setup | ||
|
||
Build docker image of KodaDot | ||
```bash | ||
docker build . -t kodadot-app | ||
``` | ||
- Build the docker image | ||
|
||
Check if container is up | ||
```bash | ||
docker ps | ||
``` | ||
```bash | ||
# Make sure you are logged into docker. | ||
|
||
Run it locally and then visit `localhost:9090` | ||
```bash | ||
docker run -p 9090:9090 --name kodadot kodadot-app | ||
``` | ||
docker-compose up --build | ||
``` | ||
|
||
Someone clean it pls, bounty for devops https://github.com/kodadot/nft-gallery/issues/1635 | ||
``` | ||
docker build -t nuxtapp . | ||
docker run -it -p 0.0.0.0:9090:9090 nuxtapp | ||
``` | ||
then go to the http://0.0.0.0:9090 | ||
- To check if container is up: | ||
```bash | ||
docker ps | ||
``` | ||
|
||
- ### From next time | ||
roiLeo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Simply run: | ||
|
||
```bash | ||
docker-compose up | ||
``` | ||
|
||
Voila! KodaDot will be available at [localhost:9090](http://localhost:9090). | ||
KodaDot supports Hot Module Replacement on docker as well, any changes made will take effect immediately. | ||
|
||
## Dev hints | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.