fix: docker files
This commit is contained in:
		
							parent
							
								
									a33e8f2c05
								
							
						
					
					
						commit
						17b0b86f6d
					
				
					 4 changed files with 30 additions and 13 deletions
				
			
		
							
								
								
									
										11
									
								
								Dockerfile
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								Dockerfile
									
										
									
									
									
								
							| 
						 | 
					@ -1,19 +1,16 @@
 | 
				
			||||||
FROM drogonframework/drogon AS installer
 | 
					FROM drogonframework/drogon-arm AS installer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ENV CORE_ROOT=$IROOT/core
 | 
					ENV CORE_ROOT=$IROOT/core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WORKDIR $IROOT
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
COPY . $CORE_ROOT
 | 
					COPY . $CORE_ROOT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WORKDIR $CORE_ROOT
 | 
					WORKDIR $CORE_ROOT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN ./build.sh
 | 
					RUN ./build.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM drogonframework/drogon
 | 
					FROM drogonframework/drogon-arm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY --from=installer /srv/core /srv/core
 | 
					COPY --from=installer /bin/core /bin/core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXPOSE 5000
 | 
					EXPOSE 5000
 | 
				
			||||||
 | 
					ENTRYPOINT ["core"]
 | 
				
			||||||
ENTRYPOINT ["/srv/core"]
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,4 @@ ENV DROGON_ROOT=$IROOT/drogon
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WORKDIR $IROOT
 | 
					WORKDIR $IROOT
 | 
				
			||||||
ADD https://api.github.com/repos/an-tao/drogon/git/refs/heads/master version.json
 | 
					ADD https://api.github.com/repos/an-tao/drogon/git/refs/heads/master version.json
 | 
				
			||||||
RUN git clone https://github.com/an-tao/drogon
 | 
					RUN git clone https://github.com/an-tao/drogon && cd drogon && ./build.sh
 | 
				
			||||||
 | 
					 | 
				
			||||||
WORKDIR $DROGON_ROOT
 | 
					 | 
				
			||||||
RUN ./build.sh
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										6
									
								
								build.sh
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								build.sh
									
										
									
									
									
								
							| 
						 | 
					@ -29,5 +29,7 @@ if [ "$?" != "0" ]; then
 | 
				
			||||||
    exit -1
 | 
					    exit -1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cp core /srv/
 | 
					cp core /bin/
 | 
				
			||||||
cp config.json /srv/
 | 
					
 | 
				
			||||||
 | 
					mkdir /srv/core
 | 
				
			||||||
 | 
					cp config.json /srv/core
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										21
									
								
								docker-compose.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								docker-compose.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					version: '3.2'
 | 
				
			||||||
 | 
					volumes:
 | 
				
			||||||
 | 
					  v-core-data:
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					  drogon-arm:
 | 
				
			||||||
 | 
					    image: drogonframework/drogon-arm
 | 
				
			||||||
 | 
					    build:
 | 
				
			||||||
 | 
					      context: .
 | 
				
			||||||
 | 
					      dockerfile: Dockerfile.drogon
 | 
				
			||||||
 | 
					  core:
 | 
				
			||||||
 | 
					    image: registry.gitlab.com/emgauwa/core
 | 
				
			||||||
 | 
					    build: 
 | 
				
			||||||
 | 
					      context: .
 | 
				
			||||||
 | 
					      dockerfile: Dockerfile
 | 
				
			||||||
 | 
					    restart: always
 | 
				
			||||||
 | 
					    ports:
 | 
				
			||||||
 | 
					      - "80:5000"
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - type: volume
 | 
				
			||||||
 | 
					        source: v-core-data
 | 
				
			||||||
 | 
					        target: /srv/core
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue