mirror of
				https://github.com/Investigamer/cardconjurer.git
				synced 2025-10-25 20:30:34 -05:00 
			
		
		
		
	* add docker config with a nginx
* add a make script for easy startup * extend the readme to subscribe, how you can run with docker
This commit is contained in:
		
							
								
								
									
										32
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | |||||||
|  | debug.log | ||||||
|  | CORS.json | ||||||
|  | *.bat | ||||||
|  | dev/* | ||||||
|  |  | ||||||
|  | # dependencies | ||||||
|  | /node_modules | ||||||
|  | /.pnp | ||||||
|  | .pnp.js | ||||||
|  |  | ||||||
|  | # testing | ||||||
|  | /coverage | ||||||
|  |  | ||||||
|  | # production | ||||||
|  | /build | ||||||
|  | /dist | ||||||
|  | /.idea | ||||||
|  | /.git | ||||||
|  |  | ||||||
|  | # misc | ||||||
|  | .DS_Store | ||||||
|  | .env.local | ||||||
|  | .env.development.local | ||||||
|  | .env.test.local | ||||||
|  | .env.production.local | ||||||
|  |  | ||||||
|  | npm-debug.log* | ||||||
|  | yarn-debug.log* | ||||||
|  |  | ||||||
|  | cardconjurer.iml | ||||||
|  | access.log | ||||||
|  | error.log | ||||||
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -25,3 +25,7 @@ dev/* | |||||||
|  |  | ||||||
| npm-debug.log* | npm-debug.log* | ||||||
| yarn-debug.log* | yarn-debug.log* | ||||||
|  |  | ||||||
|  | cardconjurer.iml | ||||||
|  | access.log | ||||||
|  | error.log | ||||||
|   | |||||||
							
								
								
									
										7
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | |||||||
|  | # syntax = docker/dockerfile:1.2 | ||||||
|  | FROM nginx:1.21-alpine as prod | ||||||
|  |  | ||||||
|  | EXPOSE 4242 | ||||||
|  | COPY . /usr/share/nginx/html/ | ||||||
|  | COPY app.conf /etc/nginx/nginx.conf | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | |||||||
|  | start: | ||||||
|  | 	docker build -f Dockerfile --target "prod" . -t "cardconjurer-client" && docker run -dit -h 127.0.0.1 -p 4242:4242 "cardconjurer-client" | ||||||
							
								
								
									
										67
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										67
									
								
								README.md
									
									
									
									
									
								
							| @@ -10,3 +10,70 @@ This repository is for the purpose of making the application usable on your loca | |||||||
|  |  | ||||||
| [](https://www.paypal.me/kyleburtondonate | [](https://www.paypal.me/kyleburtondonate | ||||||
| ) ← Help out Card Conjurer's original creator, Kyle. We love you buddy. | ) ← Help out Card Conjurer's original creator, Kyle. We love you buddy. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## Start with Docker | ||||||
|  |  | ||||||
|  | <details> | ||||||
|  |   <summary>Install Make on Ubuntu</summary> | ||||||
|  |  | ||||||
|  |   ```bash | ||||||
|  |   $ sudo apt update | ||||||
|  |   ``` | ||||||
|  |  | ||||||
|  |   check is make installed | ||||||
|  |  | ||||||
|  |   ```bash | ||||||
|  |   $ make -version | ||||||
|  |   ``` | ||||||
|  |  | ||||||
|  |   after run this command, you got the following error?  | ||||||
|  |    | ||||||
|  |   - **bash: /usr/bin/make: No such file or directory** | ||||||
|  |  | ||||||
|  |   then follow with the next step, otherwise skip the next commands | ||||||
|  |  | ||||||
|  |   ```bash | ||||||
|  |   $ sudo apt install make | ||||||
|  |   ``` | ||||||
|  |  | ||||||
|  | ### Troubleshooting's?  | ||||||
|  |  * Follow this guide https://linuxhint.com/install-make-ubuntu/ | ||||||
|  | </details> | ||||||
|  |  | ||||||
|  | <details> | ||||||
|  |   <summary>Install Make on Mac</summary> | ||||||
|  |  | ||||||
|  |   check is make installed | ||||||
|  |  | ||||||
|  |   ```bash | ||||||
|  |   $ make -version | ||||||
|  |   ``` | ||||||
|  |  | ||||||
|  |   after run this command, you got the following error?  | ||||||
|  |    | ||||||
|  |   - **zsh: command not found: make** | ||||||
|  |  | ||||||
|  |   then follow with the next step, otherwise skip the next commands | ||||||
|  |  | ||||||
|  |   ```bash | ||||||
|  |   $ (sudo) brew install make | ||||||
|  |   ``` | ||||||
|  | </details> | ||||||
|  |  | ||||||
|  | <details> | ||||||
|  |   <summary>Install Make on Windows</summary> | ||||||
|  |  | ||||||
|  |   Follow this Guide | ||||||
|  |   https://sp21.datastructur.es/materials/guides/make-install.html#windows-installation | ||||||
|  | </details> | ||||||
|  |  | ||||||
|  | * go to the downloaded/ cloned folder with your terminal/ powershell (windows) and run the following command | ||||||
|  |  | ||||||
|  | ```bash | ||||||
|  | $ make start | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | ### Important | ||||||
|  |  | ||||||
|  | Be sure, that you are running Docker Desktop under Windows or Mac before you can run the make command. | ||||||
|   | |||||||
							
								
								
									
										37
									
								
								app.conf
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										37
									
								
								app.conf
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,37 @@ | |||||||
|  | worker_processes  1; | ||||||
|  |  | ||||||
|  | events { | ||||||
|  |     worker_connections  1024; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | http { | ||||||
|  |     include       mime.types; | ||||||
|  |     default_type  application/octet-stream; | ||||||
|  |     sendfile        on; | ||||||
|  |  | ||||||
|  |     keepalive_timeout  65; | ||||||
|  |     gzip  on; | ||||||
|  |     server { | ||||||
|  |         listen 4242 default_server; | ||||||
|  |         server_name localhost; | ||||||
|  |         root  /usr/share/nginx/html; | ||||||
|  |         index index.html index.htm; | ||||||
|  |         location ~* \.(?:manifest|appcache|html?|xml|json)$ { | ||||||
|  |           expires -1; | ||||||
|  |         } | ||||||
|  |         location ~* \.(?:css|js)$ { | ||||||
|  |           try_files $uri =404; | ||||||
|  |           expires 1y; | ||||||
|  |           access_log off; | ||||||
|  |           add_header Cache-Control "public"; | ||||||
|  |         } | ||||||
|  |         # Any route containing a file extension (e.g. /devicesfile.js) | ||||||
|  |         location ~ ^.+\..+$ { | ||||||
|  |           try_files $uri =404; | ||||||
|  |         } | ||||||
|  |         # Any route that doesn't have a file extension (e.g. /devices) | ||||||
|  |         location / { | ||||||
|  |             try_files $uri $uri/ /index.html; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										0
									
								
								launcher-macos
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								launcher-macos
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
		Reference in New Issue
	
	Block a user
	 sassar88
					sassar88