diff --git a/.drone.yml b/.drone.yml index c930e3c..b83a63b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,5 +15,8 @@ steps: - name: pull into the folduh commands: - cd /usr/share/$DRONE_REPO_NAME - - git pull - + - git pull +- name: docker-compose-rebuild + commands: + - cd /usr/share/$DRONE_REPO_NAME + - docker compose up -d --build diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c258818 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM node:16 as build-step + +RUN mkdir -p /app +WORKDIR /app +COPY package.json /app +RUN npm install +COPY . /app +RUN npm run build --prod + +CMD npm run start + +# FROM nginx:1.20.1 +# COPY --from=build-step /app/dist/nedvach /usr/share/nginx/html +# EXPOSE 4200:80 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8fef6f1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.7" + +services: + angular-service: + container_name: ng-dvach + build: . + ports: + - "4200:4200" \ No newline at end of file diff --git a/package.json b/package.json index 58c8cbc..df5a126 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve --host=0.0.0.0 --disable-host-check", "build": "ng build", "watch": "ng build --watch --configuration development", "test": "ng test" diff --git a/src/app/boards/boards.component.ts b/src/app/boards/boards.component.ts index 88acf4c..48741e1 100644 --- a/src/app/boards/boards.component.ts +++ b/src/app/boards/boards.component.ts @@ -18,7 +18,7 @@ export class BoardsComponent implements OnInit { listPosts() { console.log("Получаю данные..."); - this.http.get('http://localhost:7141/List') + this.http.get('http://api.vdk2ch.ru:5000/List') .subscribe((response)=> { this.response = response; console.log(this.response); diff --git a/src/favicon.ico b/src/favicon.ico index 997406a..8d33a0f 100644 Binary files a/src/favicon.ico and b/src/favicon.ico differ