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: networks:
- backend-net - backend-net
environment: environment:
- APPPORT=3000 - APPPORT=4000
- DBHOST=db - DBHOST=db
- DBPORT=5432 - DBPORT=5432
- DBNAME=komponiranje - DBNAME=komponiranje
@ -44,7 +44,7 @@ services:
networks: networks:
- backend-net - backend-net
environment: environment:
- APPPORT=3000 - APPPORT=4001
- DBHOST=db - DBHOST=db
- DBPORT=5432 - DBPORT=5432
- DBNAME=komponiranje - DBNAME=komponiranje

View File

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

View File

@ -1,25 +1,25 @@
{ {
"short_name": "React App", "short_name": "Komponiranje",
"name": "Create React App Sample", "name": "Komponiranje frontend demo",
"icons": [ "icons": [
{ {
"src": "favicon.ico", "src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16", "sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon" "type": "image/x-icon"
}, },
{ {
"src": "logo192.png", "src": "logo192.png",
"type": "image/png", "type": "image/png",
"sizes": "192x192" "sizes": "192x192"
}, },
{ {
"src": "logo512.png", "src": "logo512.png",
"type": "image/png", "type": "image/png",
"sizes": "512x512" "sizes": "512x512"
} }
], ],
"start_url": ".", "start_url": ".",
"display": "standalone", "display": "standalone",
"theme_color": "#000000", "theme_color": "#000000",
"background_color": "#ffffff" "background_color": "#ffffff"
} }

View File

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

View File

@ -6,13 +6,13 @@ import (
type configStruct struct { type configStruct struct {
AppHost string `default:"0.0.0.0"` AppHost string `default:"0.0.0.0"`
AppPort int `default:"3000"` AppPort int `default:"4000"`
DbHost string `default:"localhost"` DbHost string `default:"localhost"`
DbPort int `default:"55432"` DbPort int `default:"55432"`
DbName string `default:"komponiranje"` DbName string `default:"komponiranje"`
DbUser string `default:"pero"` DbUser string `default:"pero"`
DbPassword string `default:"pero.000"` DbPassword string `default:"pero.000"`
ProductsAppUrl string `default:"http://localhost:3001"` ProductsAppUrl string `default:"http://localhost:4001"`
} }
const ENV_PREFIX = "" 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:
@docker run \ @docker run \
--name $(CONTAINER_NAME) \ --name $(CONTAINER_NAME) \
--publish 3000:3000 \ --publish 4001:4001 \
--env CONTAINER_NAME="Awesome API server" \
--env DBPORT=55432 \ --env DBPORT=55432 \
--detach \ --detach \
$(IMAGE_NAME) $(IMAGE_NAME)

View File

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

View File

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