Second-hand transaction applet for Sun Yat-sen University: ZDSwap
- Yufc(ffengc)
- Songwh(ssugarwh)
- Linjy(jfightyr)
- Pengyx(KuroisuSan)
- Liy(ly245422)
The picture below shows all the pages of this project.
home page:
Other pages are not shown here.
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.
Thanks to Suha-Multipurpose Ecommerce Mobile HTML Template for providing the template