mirror of
				https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
				synced 2025-11-04 12:25:48 +00:00 
			
		
		
		
	Add Dockerfile
This commit is contained in:
		
							
								
								
									
										4
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
node_modules
 | 
			
		||||
.git
 | 
			
		||||
store
 | 
			
		||||
scripts
 | 
			
		||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -2,3 +2,4 @@
 | 
			
		||||
.DS_Store
 | 
			
		||||
/node_modules
 | 
			
		||||
/store
 | 
			
		||||
/scripts/docker-push.sh
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
FROM node:20-alpine
 | 
			
		||||
 | 
			
		||||
WORKDIR /usr/src/app
 | 
			
		||||
 | 
			
		||||
VOLUME /usr/src/app/store
 | 
			
		||||
 | 
			
		||||
COPY package*.json ./
 | 
			
		||||
 | 
			
		||||
RUN apk add --no-cache --virtual .gyp \
 | 
			
		||||
        py3-pip \
 | 
			
		||||
        build-base \
 | 
			
		||||
        make \
 | 
			
		||||
        g++ \
 | 
			
		||||
    && mkdir store && chmod 777 store && npm install \
 | 
			
		||||
    && apk del .gyp
 | 
			
		||||
 | 
			
		||||
COPY . .
 | 
			
		||||
 | 
			
		||||
EXPOSE 3000
 | 
			
		||||
 | 
			
		||||
CMD [ "node", "." ]
 | 
			
		||||
							
								
								
									
										3
									
								
								scripts/docker-build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								scripts/docker-build.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
docker build . $1 -t xpop:latest
 | 
			
		||||
							
								
								
									
										3
									
								
								scripts/docker-run.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								scripts/docker-run.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
source .env && docker run -i --name xpop --rm -p 3000:3000 xpop
 | 
			
		||||
		Reference in New Issue
	
	Block a user