Skip to content

Commit

Permalink
refactor(docker): remove load balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
Onyxmoon committed Jan 9, 2024
1 parent 6e813f2 commit 7eaa656
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 231 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-push-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Check and set release version
run: |
echo "RELEASE_VERSION=$(git tag -l --format='%(contents:subject)'${GITHUB_REF#refs/*/})" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "RELEASE_VERSION: '$RELEASE_VERSION'"
- if: ${{ env.RELEASE_VERSION != '' && contains(github.ref, 'main') }}
Expand Down
96 changes: 0 additions & 96 deletions docker-compose.dev.native.yml

This file was deleted.

87 changes: 60 additions & 27 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,96 @@
version: "3.8"

services:
proxy:
build:
context: ./
dockerfile: ./src/http-proxy-service/Dockerfile
environment:
- PROXY_CONFIG_PATH=./config/proxyConfig.docker.yaml
volumes:
- ./src/http-proxy-service/config:/config
ports:
- 8080:8080
- "8080:8080"
depends_on:
- lbweb
networks:
- dev-network
- web

lbweb:
web:
build:
context: ./
dockerfile: ./src/load-balancer-service/Dockerfile
environment:
- LOAD_BALANCER_CONFIG_PATH=./config/config.web-service.dev.yaml
dockerfile: ./src/web-service/Dockerfile
ports:
- 3000:3000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "3000:3000"
depends_on:
- products
- shoppinglists
- users
networks:
- dev-network

products:
build:
context: ./
dockerfile: ./src/product-service/Dockerfile
ports:
- 3003:3003
- 50053:50053
networks:
- dev-network
- "3003:3003"
- "50053:50053"
env_file:
- ./src/product-service/.env
depends_on:
database:
condition: service_healthy

users:
build:
context: ./
dockerfile: ./src/user-service/Dockerfile
ports:
- 3001:3001
- 50051:50051
networks:
- dev-network
- "3001:3001"
- "50051:50051"
env_file:
- ./src/user-service/.env
volumes:
- ./src/user-service/privateKey.pem:/privateKey.pem
depends_on:
database:
condition: service_healthy

shoppinglists:
build:
context: ./
dockerfile: ./src/shoppinglist-service/Dockerfile
ports:
- 3002:3002
networks:
- dev-network
- "3002:3002"
env_file:
- ./src/shoppinglist-service/.env
depends_on:
database:
condition: service_healthy

database:
image: rqlite/rqlite:8.15.0
ports:
- "4001:4001"
command: ["-node-id", "1", "-auth", "/run/secrets/config.json", "-http-adv-addr", "database:4001"]
configs:
- source: database
target: config.json
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:4001/readyz || exit 1"]
interval: 5s
retries: 5
start_period: 30s
start_interval: 1s

networks:
dev-network:
name: dev-network
configs:
database:
content: |
[
{
"username": "user",
"password": "password",
"perms": [ "all" ]
},
{
"username": "*",
"perms": ["ready"]
}
]
55 changes: 0 additions & 55 deletions docker-compose.native.yml

This file was deleted.

1 change: 0 additions & 1 deletion docker-compose.push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ services:
dockerfile: ./src/web-service/Dockerfile
image: onyxmoon/pw-web-service:${RELEASE_VERSION:-latest}


products:
build:
context: ./
Expand Down
Loading

0 comments on commit 7eaa656

Please sign in to comment.