Skip to content

Commit

Permalink
Initial commit for mac version
Browse files Browse the repository at this point in the history
  • Loading branch information
rexruan committed Feb 24, 2024
1 parent b8cf7d9 commit 22cbb7d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ services:
depends_on:
- db
container_name: swegram-backend-fastapi
ports:
- "8000:8000"
restart: always
privileged: true
network_mode: host
# network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
profiles:
Expand All @@ -45,7 +47,7 @@ services:
container_name: vue-nginx
ports:
- "8080:80"
network_mode: host
# network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
profiles:
Expand Down
1 change: 1 addition & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ COPY dist/ /usr/share/nginx/html

# Expose the port that Nginx will run on
EXPOSE 80
EXPOSE 8080

# Command to start Nginx
CMD ["nginx", "-g", "daemon off;"]
4 changes: 4 additions & 0 deletions mac.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Mac

* Docker desktop requires a newer version for mac os
* xcode-select --install (Install xcode-select after upgrading mac os)
12 changes: 6 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ BASE_PATH=$(pwd)
FRONTEND_PATH="$BASE_PATH/frontend"
user=$(whoami)

# create vue-builder image
cd $FRONTEND_PATH
docker build --network host -t vue-builder -f Dockerfile.build .
# # create vue-builder image
# cd $FRONTEND_PATH
# docker build --network host -t vue-builder -f Dockerfile.build .

# run vue-builder image to create dist
docker run --rm -v $FRONTEND_PATH/dist:/root/dist vue-builder
# # run vue-builder image to create dist
# docker run --rm -v $FRONTEND_PATH/dist:/root/dist vue-builder

# change ownership for dist generated from vue-builder
chown -R $user:$user dist
# chown -R $user:$user dist


# Create swegram-backend image
Expand Down

0 comments on commit 22cbb7d

Please sign in to comment.