Skip to content
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

Kukai Containerization using Docker #574

Open
wants to merge 5 commits into
base: production
Choose a base branch
from
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
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ignore Node.js modules
node_modules/

# Ignore compiled output
dist/

# Ignore logs
*.log

# Ignore system files
.DS_Store
Thumbs.db

# Ignore environment-specific files
.env
.env.*

# Ignore code editors and IDEs
.idea/
.vscode/

# Ignore Git files
.git/
.gitignore
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Stage 1: Build the Angular app
FROM node:latest AS builder

WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the container
COPY package*.json ./

RUN npm install -g @angular/cli

# Copy the rest of the application code to the container
COPY . .

# Install dependencies and build the app
RUN npm install
RUN npm run build-prod-memory

# Stage 2: Create the final image
FROM nginx:alpine

# Copy the built Angular app from the previous stage
COPY --from=builder /usr/src/app/dist /usr/share/nginx/html

# Expose port 80 (the default Nginx port)
EXPOSE 80

# Start Nginx
CMD ["nginx", "-g", "daemon off;"]
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,21 @@ Run during development:

`ng serve --open`

Run Kukai through Docker container, follow this:

Building the image:

`docker build -t kukai-wallet:latest .`

Running the container:

`docker run -d -p 4200:80 --name kukai-cont kukai-wallet:latest`

OR
Directly run the container using docker compose

`docker compose up -d`


## Latest Audit
[Least Authority](audit/Least%20Authority%20-%20Tezos%20Foundation%20Kukai%20Wallet%20Final%20Audit%20Report.pdf) (2022-03-04)
[Least Authority](audit/Least%20Authority%20-%20Tezos%20Foundation%20Kukai%20Wallet%20Final%20Audit%20Report.pdf) (2022-03-04)
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
kukai-angular-app:
build:
context: .
dockerfile: Dockerfile
ports:
- "4200:80"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"start": "ng serve --open --watch",
"start:https": "ng build --watch && http-server -S -C RootCA.pem -K RootCA.key -p 3000 -c-1 dist",
"build-prod": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration production",
"build-prod-memory": "node ./node_modules/@angular/cli/bin/ng build --configuration production",
"build-testnet": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration testnet",
"build-mainnet": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration mainnet",
"build-dev": "npm run build-testnet",
Expand Down