Move apps to different ports

This commit is contained in:
Eden Kirin
2024-01-23 20:14:01 +01:00
parent 4dc99b740b
commit b69f26027d
9 changed files with 905 additions and 907 deletions

View File

@ -24,7 +24,7 @@ services:
networks:
- backend-net
environment:
- APPPORT=3000
- APPPORT=4000
- DBHOST=db
- DBPORT=5432
- DBNAME=komponiranje
@ -44,7 +44,7 @@ services:
networks:
- backend-net
environment:
- APPPORT=3000
- APPPORT=4001
- DBHOST=db
- DBPORT=5432
- DBNAME=komponiranje

View File

@ -1,14 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
@ -24,9 +22,10 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<title>Komponiranje frontend demo</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
@ -39,5 +38,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</body>
</html>

View File

@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "Komponiranje",
"name": "Komponiranje frontend demo",
"icons": [
{
"src": "favicon.ico",

View File

@ -26,8 +26,7 @@ docker-build: clean
docker-run:
@docker run \
--name $(CONTAINER_NAME) \
--publish 3000:3000 \
--env CONTAINER_NAME="Awesome API server" \
--publish 4000:4000 \
--env DBPORT=55432 \
--detach \
$(IMAGE_NAME)

View File

@ -6,13 +6,13 @@ import (
type configStruct struct {
AppHost string `default:"0.0.0.0"`
AppPort int `default:"3000"`
AppPort int `default:"4000"`
DbHost string `default:"localhost"`
DbPort int `default:"55432"`
DbName string `default:"komponiranje"`
DbUser string `default:"pero"`
DbPassword string `default:"pero.000"`
ProductsAppUrl string `default:"http://localhost:3001"`
ProductsAppUrl string `default:"http://localhost:4001"`
}
const ENV_PREFIX = ""

File diff suppressed because it is too large Load Diff

View File

@ -26,8 +26,7 @@ docker-build: clean
docker-run:
@docker run \
--name $(CONTAINER_NAME) \
--publish 3000:3000 \
--env CONTAINER_NAME="Awesome API server" \
--publish 4001:4001 \
--env DBPORT=55432 \
--detach \
$(IMAGE_NAME)

View File

@ -6,7 +6,7 @@ import (
type configStruct struct {
AppHost string `default:"0.0.0.0"`
AppPort int `default:"3001"`
AppPort int `default:"4001"`
DbHost string `default:"localhost"`
DbPort int `default:"55432"`
DbName string `default:"komponiranje"`

View File

@ -43,7 +43,7 @@ static_resources:
address:
socket_address:
address: machines-app
port_value: 3000
port_value: 4000
- name: products-app
connect_timeout: 0.25s
type: strict_dns
@ -56,7 +56,7 @@ static_resources:
address:
socket_address:
address: products-app
port_value: 3000
port_value: 4001
admin:
access_log_path: "/dev/null"
address: