Move apps to different ports
This commit is contained in:
@ -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
|
||||
|
||||
@ -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>
|
||||
</html>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,25 +1,25 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
"short_name": "Komponiranje",
|
||||
"name": "Komponiranje frontend demo",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
@ -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)
|
||||
|
||||
@ -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"`
|
||||
|
||||
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user