docker
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2022-10-20 02:59:49 +10:00
parent 24279cd3da
commit 76f505af06
6 changed files with 29 additions and 4 deletions

View File

@ -16,4 +16,7 @@ steps:
commands:
- cd /usr/share/$DRONE_REPO_NAME
- git pull
- name: docker-compose-rebuild
commands:
- cd /usr/share/$DRONE_REPO_NAME
- docker compose up -d --build

14
Dockerfile Normal file
View File

@ -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

8
docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
version: "3.7"
services:
angular-service:
container_name: ng-dvach
build: .
ports:
- "4200:4200"

View File

@ -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"

View File

@ -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);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 15 KiB