diff --git a/docker-compose.yml b/docker-compose.yml index df97e53..11ff46b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: @@ -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: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 35c1aa7..70f4cf9 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -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;"] diff --git a/mac.md b/mac.md new file mode 100644 index 0000000..2de0413 --- /dev/null +++ b/mac.md @@ -0,0 +1,4 @@ +# Mac + +* Docker desktop requires a newer version for mac os +* xcode-select --install (Install xcode-select after upgrading mac os) diff --git a/run.sh b/run.sh index 726eefb..fd09b3f 100644 --- a/run.sh +++ b/run.sh @@ -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