-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78a710b
commit 9fd3bff
Showing
12 changed files
with
84 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: '3.9' | ||
|
||
services: | ||
|
||
linkzapurl-server-1: | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile | ||
image: linkzapurl-server | ||
container_name: linkzapurl-server-1 | ||
volumes: | ||
- "./docker/config.yaml:/config/config.yaml" | ||
restart: always | ||
ports: | ||
- "9000:8080" | ||
environment: | ||
MACHINE_ID: 1 | ||
ENDPOINT: http://localhost | ||
linkzapurl-server-2: | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile | ||
image: linkzapurl-server | ||
container_name: linkzapurl-server-2 | ||
volumes: | ||
- "./docker/config.yaml:/config/config.yaml" | ||
restart: always | ||
ports: | ||
- "9001:8080" | ||
environment: | ||
MACHINE_ID: 2 | ||
ENDPOINT: http://localhost |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.9' | ||
|
||
services: | ||
nginx: | ||
image: nginx:1.25.3 | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
restart: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Build Docker images | ||
docker-compose build | ||
|
||
# Stop | ||
docker-compose down | ||
|
||
# Start all services | ||
docker-compose up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
limit_req_zone $binary_remote_addr zone=postLimit:10m rate=10r/s; # 10 requests per second | ||
|
||
upstream loadbalancer { | ||
server host.docker.internal:9000; | ||
server host.docker.internal:9001; | ||
} | ||
|
||
server { | ||
listen 80; | ||
|
||
location / { | ||
proxy_pass http://loadbalancer; | ||
} | ||
|
||
location /api/v1/urls { | ||
limit_req zone=postLimit burst=100; | ||
proxy_pass http://loadbalancer; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/bin/bash | ||
# Stop and remove containers | ||
docker-compose -f docker-compose.windows.yml down -v | ||
docker-compose down -v | ||
|
||
# Build Docker images | ||
docker-compose -f docker-compose.windows.yml build | ||
docker-compose build | ||
|
||
# Start all services | ||
docker-compose -f docker-compose.windows.yml up | ||
docker-compose up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters