[fix] Fixed docker and CI/CD

This commit is contained in:
ITQ
2024-04-01 00:33:36 +03:00
parent a3b2889f2d
commit 01e5632856
3 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -66,6 +66,6 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build Docker image - name: Build Docker image
run: docker build -t skillhub/backend backend/ run: docker build -t skillhub_backend backend/
- name: Push Docker image - name: Push Docker image
run: docker push skillhub/backend run: docker push skillhub_backend
+6 -2
View File
@@ -12,6 +12,8 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '18' node-version: '18'
- name: Change directory
run: cd frontend
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
- name: Linting - name: Linting
@@ -28,6 +30,8 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '18' node-version: '18'
- name: Change directory
run: cd frontend
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
- name: Build - name: Build
@@ -40,5 +44,5 @@ jobs:
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push Docker image - name: Build and push Docker image
run: | run: |
docker build -t skillhub/frontend frontend/ docker build -t skillhub-backend frontend/
docker push skillhub/frontend docker push skillhub-backend
+2 -2
View File
@@ -20,7 +20,7 @@ services:
backend: backend:
build: ./backend build: ./backend
container_name: backend container_name: itqdev/skillhub-backend
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
@@ -43,7 +43,7 @@ services:
- 8080:8080 - 8080:8080
frontend: frontend:
container_name: frontend container_name: itqdev/skillhub-backend
build: build:
context: ./frontend context: ./frontend
dockerfile: Dockerfile dockerfile: Dockerfile