diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1b2f0b0..7eeafa7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Login to Docker Hub + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -22,4 +21,31 @@ jobs: run: docker build -t daemontus/bbm-backend . - name: Push image working-directory: backend - run: docker push daemontus/bbm-backend \ No newline at end of file + run: docker push daemontus/bbm-backend + + frontend: + name: Build frontend image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Add Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' + - name: Install dependencies + working-directory: frontend + run: npm install + - name: Build frontend + working-directory: frontend + run: npm run build + - name: Build image + working-directory: frontend + run: docker build -t daemontus/bbm-frontend . + - name: Push image + working-directory: frontend + run: docker push daemontus/bbm-frontend \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..0281e51 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.24.0 + +COPY nginx.conf /etc/nginx/nginx.conf +COPY ./dist /www diff --git a/frontend/nginx.conf b/frontend/nginx.conf new file mode 100644 index 0000000..de600f1 --- /dev/null +++ b/frontend/nginx.conf @@ -0,0 +1,16 @@ +events { + # configuration of connection processing +} + +http { + server { + listen 80; + server_name bbm.unsigned-short.com; + + root /www; + + location / { + include /etc/nginx/mime.types; + } + } +}