add gitlab-ci
This commit is contained in:
@@ -5,6 +5,8 @@ stages:
|
|||||||
|
|
||||||
build_backend:
|
build_backend:
|
||||||
stage: build
|
stage: build
|
||||||
|
tags:
|
||||||
|
- ubuntulab01
|
||||||
script:
|
script:
|
||||||
- echo "Deploying code to server..."
|
- echo "Deploying code to server..."
|
||||||
- docker build -t my_back .notes-backend/
|
- docker build -t my_back .notes-backend/
|
||||||
@@ -14,6 +16,8 @@ build_backend:
|
|||||||
|
|
||||||
build_frontend:
|
build_frontend:
|
||||||
stage: build
|
stage: build
|
||||||
|
tags:
|
||||||
|
- ubuntulab01
|
||||||
script:
|
script:
|
||||||
- echo "Deploying code to server..."
|
- echo "Deploying code to server..."
|
||||||
- docker build -t my_front .notes-app/
|
- docker build -t my_front .notes-app/
|
||||||
@@ -22,6 +26,8 @@ build_frontend:
|
|||||||
|
|
||||||
build_nginx:
|
build_nginx:
|
||||||
stage: build
|
stage: build
|
||||||
|
tags:
|
||||||
|
- ubuntulab01
|
||||||
script:
|
script:
|
||||||
- echo "Deploying code to server..."
|
- echo "Deploying code to server..."
|
||||||
- docker build -t my_nginx .nginx/
|
- docker build -t my_nginx .nginx/
|
||||||
@@ -30,6 +36,8 @@ build_nginx:
|
|||||||
|
|
||||||
create_network:
|
create_network:
|
||||||
stage: predeploy
|
stage: predeploy
|
||||||
|
tags:
|
||||||
|
- ubuntulab01
|
||||||
script:
|
script:
|
||||||
- echo "create network..."
|
- echo "create network..."
|
||||||
- docker network create app || true
|
- docker network create app || true
|
||||||
@@ -38,6 +46,8 @@ create_network:
|
|||||||
|
|
||||||
run_backend_container:
|
run_backend_container:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
tags:
|
||||||
|
- ubuntulab01
|
||||||
script:
|
script:
|
||||||
- echo "Running container in the 'app' network..."
|
- echo "Running container in the 'app' network..."
|
||||||
- docker run -d --name notes-backend --network app my_back
|
- docker run -d --name notes-backend --network app my_back
|
||||||
@@ -46,6 +56,8 @@ run_backend_container:
|
|||||||
|
|
||||||
run_frontend_container:
|
run_frontend_container:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
tags:
|
||||||
|
- ubuntulab01
|
||||||
script:
|
script:
|
||||||
- echo "Running container in the 'app' network..."
|
- echo "Running container in the 'app' network..."
|
||||||
- docker run -d --name notes-app --network app my_front
|
- docker run -d --name notes-app --network app my_front
|
||||||
|
|||||||
Reference in New Issue
Block a user