Skip to content
/ ZDSwap Public

Second-hand transaction applet for Sun Yat-sen University: ZDSwap

License

Notifications You must be signed in to change notification settings

ffengc/ZDSwap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZDSwap

Second-hand transaction applet for Sun Yat-sen University: ZDSwap

Second-hand transaction applet for Sun Yat-sen University: ZDSwap

[📄Document]   [💻Platform]  
[🌅Code]  



🌟Collaborators🌟

📃Project page structure

The picture below shows all the pages of this project.

📸Screenshots

home page:

Other pages are not shown here.

🐳Deploy nginx service with docker

Clone the repository:

https://github.com/ffengc/ZDSwap.git
cd ZDSwap;

Deploy using dockerfile:

1. Create dockerfile

FROM nginx:latest
COPY ./wwwroot /usr/share/nginx/html
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]

2. Add permissions to files

Create scriptChMod.sh

#!/bin/bash
# write by Yufc
# Check if directory is provided as parameter
if [ "$#" -ne 1 ]; then
    echo "Usage: $0 <directory>"
    exit 1
fi
# Get directory parameters
directory=$1
# Check if directory exists
if [ ! -d "$directory" ]; then
    echo "Error: Directory does not exist."
    exit 1
fi
# Add permissions to all files and folders in the directory and its subdirectories
find "$directory" -type d -exec chmod a+rwx {} \;
find "$directory" -type f -exec chmod a+rwx {} \;
echo "ALL permissions have been added to all files and directories within $directory."

run script: ./ChMod.sh ./wwwroot

3. Deploy service

docker build -t nginx-homepage .
docker run -d -p 8080:80 nginx-homepage

After deployment, just access the server port 8080.

cite

Thanks to Suha-Multipurpose Ecommerce Mobile HTML Template for providing the template