Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker-compose to use as plugin instead of separate tool #2626

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/certbot-update-cert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
API_GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
- name: Update certs
run: |
docker-compose pull
docker-compose run --rm certbot renew --allow-subset-of-names
docker-compose restart brn_fe_with_tls
docker compose pull
docker compose run --rm certbot renew --allow-subset-of-names
docker compose restart brn_fe_with_tls
docker image prune -af
2 changes: 1 addition & 1 deletion .github/workflows/create_cert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
API_GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
- name: Create cert
run: |
docker-compose run --rm certbot certonly --webroot --webroot-path=/var/www/html --email brainupproject@yandex.ru -d brainup.fun
docker compose run --rm certbot certonly --webroot --webroot-path=/var/www/html --email brainupproject@yandex.ru -d brainup.fun
6 changes: 3 additions & 3 deletions .github/workflows/docker-build-push-redeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ jobs:
# Link 2: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif
- name: Redeploy backend
run: |
docker-compose pull
docker-compose up -d --no-deps brn
docker compose pull
docker compose up -d --no-deps brn
- name: Redeploy frontend selectel
if: matrix.runners == 'selectel'
run: docker-compose up -d --no-deps brn_fe_with_tls
run: docker compose up -d --no-deps brn_fe_with_tls
- name: Remove old images
run: docker image prune -af
6 changes: 3 additions & 3 deletions .github/workflows/instances-redeploy.yml_tmp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
- name: Redeploy application
run: |
docker-compose pull
docker-compose down
docker-compose up -d
docker compose pull
docker compose down
docker compose up -d
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gradle:jdk17 as builder
FROM gradle:jdk17 AS builder

WORKDIR /brn
ADD . /brn
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile_frontend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12 as build-frontend
FROM node:12 AS build-frontend
ARG FIREBASE_PROJECT_ID
ENV FIREBASE_PROJECT_ID ${FIREBASE_PROJECT_ID:-}
ARG FIREBASE_AUTH_DOMAIN
Expand All @@ -10,7 +10,7 @@ WORKDIR /src
RUN yarn
RUN node node_modules/ember-cli/bin/ember deploy production

FROM node:12 as build-frontend-angular
FROM node:12 AS build-frontend-angular
COPY frontend-angular/ /src/
WORKDIR /src
RUN npm ci
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile_frontend_with_tls
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:12 as build-frontend
FROM node:12 AS build-frontend
COPY frontend/ /src/
WORKDIR /src
RUN yarn
RUN node node_modules/ember-cli/bin/ember deploy production

FROM node:12 as build-frontend-angular
FROM node:12 AS build-frontend-angular
COPY frontend-angular/ /src/
WORKDIR /src
RUN npm ci
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ docker_clean_app_images: stop
docker rmi brn_test db_brn brn

docker_clean_test_containers:
docker-compose -f docker-compose-unit-test.yml down
docker compose -f docker-compose-unit-test.yml down

docker_unit_test: clean
docker-compose -f docker-compose-unit-test.yml up --build --force-recreate --exit-code-from brn-test
docker compose -f docker-compose-unit-test.yml up --build --force-recreate --exit-code-from brn-test

start:
docker-compose up --build --force-recreate
docker compose up --build --force-recreate

stop:
docker-compose down
docker compose down

restart: clean stop start
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ Note that if you are using IntelliJ, you may want to use version 2019.2 and late
(back-end part and front-end parts, but it is rather slow. it is better to use GitPod)
From console, from project's folder, execute:
```bash
docker-compose up --build
docker compose up --build
```
Alternatively, use daemon mode (no console output):
```bash
docker-compose up --build -d
docker compose up --build -d
```
Local REST API will be accessible at http://localhost:8081/api/swagger-ui.html
Public is always here https://brainup.site/admin/swagger (login with ADMIN role user)
Expand Down
15 changes: 7 additions & 8 deletions docker-compose-run.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
db_brn:
image: postgres:13
Expand Down Expand Up @@ -33,13 +32,13 @@ services:
- firebase_config_json
depends_on:
- db_brn
brn_fe:
image: brainup/brn-frontend:latest
container_name: brn_fe
# ports:
# - 80:80
depends_on:
- brn
# brn_fe:
# image: brainup/brn-frontend:latest
# container_name: brn_fe
# # ports:
# # - 80:80
# depends_on:
# - brn
brn_fe_with_tls:
image: brainup/brn-frontend-with-tls:latest
container_name: brn_fe_with_tls
Expand Down
1 change: 0 additions & 1 deletion docker-compose-unit-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
db:
image: postgres:13
Expand Down
1 change: 0 additions & 1 deletion docker-compose-with-secret.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
db_brn:
image: postgres:13
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
db_brn:
container_name: db_brn
Expand Down
Loading