From b74d1f7fbeca4c388381510da21b4f97f0a0cb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Tue, 18 Nov 2025 20:00:29 +0300 Subject: [PATCH] add ci extra --- .gitlab-ci.yml | 18 ++++++++++++++++++ docker-compose.yml | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d2d4613 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +stages: + - deploy + +variables: + COMPOSE_PROJECT_NAME: travelmarine-backend + DOCKER_HOST: unix:///var/run/docker.sock + +deploy: + stage: deploy + only: + - main + tags: + - shell + script: + - docker compose -p "$COMPOSE_PROJECT_NAME" up -d --build + environment: + name: production + url: http://89.169.188.2 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b4724b0..e91c2a4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: image: postgres:16-alpine restart: always environment: - POSTGRES_DB: yachtbooking + POSTGRES_DB: travelmarinedb POSTGRES_USER: yacht POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change_me} volumes: @@ -16,7 +16,7 @@ services: environment: NODE_ENV: production PORT: 4000 - DATABASE_URL: postgresql://yacht:${POSTGRES_PASSWORD:-change_me}@postgres:5432/yachtbooking + DATABASE_URL: postgresql://yacht:${POSTGRES_PASSWORD:-change_me}@postgres:5432/travelmarinedb depends_on: - postgres ports: