"update service port configuration and docker setup"
This commit is contained in:
16
01_Requirements/REQ0180/index.md
Normal file
16
01_Requirements/REQ0180/index.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
tags: docker, ports
|
||||
---
|
||||
|
||||
# REQ0180 service port schedule
|
||||
|
||||
## Port Usage
|
||||
|
||||
| Service | Host Port | Container Port | Environment | Purpose |
|
||||
| ----------- | --------- | -------------- | ----------- | -------------------------------- |
|
||||
| Frontend | 10001 | 8080 | All | Web application access |
|
||||
| Mobile | 10004 | 3000 | All | Mobile application access |
|
||||
| CMS Backend | 10002 | 7272 | All | Main API access |
|
||||
| CMS Backend | 10003 | 5555 | All | Additional service access |
|
||||
| Postgres | - | 5432 | Production | Database access (container only) |
|
||||
| Postgres | 5432 | 5432 | Development | Database access |
|
15
03_source/docker/99_prod.sh
Executable file
15
03_source/docker/99_prod.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
# -f docker-compose.db.yml
|
||||
DOCKER_COMPOSE_FILES=" -f docker-compose.yml"
|
||||
|
||||
# docker compose $DOCKER_COMPOSE_FILES build
|
||||
docker compose $DOCKER_COMPOSE_FILES up -d
|
||||
|
||||
# cd ../api_server
|
||||
# yarn docker:dev
|
||||
# cd ..
|
||||
|
||||
# docker compose $DOCKER_COMPOSE_FILES logs -f
|
@@ -1,9 +1,14 @@
|
||||
services:
|
||||
frontend:
|
||||
command: "sleep infinity"
|
||||
command: 'sleep infinity'
|
||||
|
||||
mobile:
|
||||
command: "sleep infinity"
|
||||
command: 'sleep infinity'
|
||||
|
||||
cms_backend:
|
||||
command: "sleep infinity"
|
||||
command: 'sleep infinity'
|
||||
|
||||
postgres:
|
||||
# container_name: postgres
|
||||
ports:
|
||||
- '5432:5432'
|
||||
|
@@ -8,22 +8,22 @@ services:
|
||||
build: ../frontend
|
||||
# user: 1000:1000
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 10001:8080
|
||||
volumes:
|
||||
- ../frontend:/app
|
||||
working_dir: "/app"
|
||||
command: "yarn dev"
|
||||
working_dir: '/app'
|
||||
command: './dev.sh'
|
||||
|
||||
mobile:
|
||||
image: 192.168.10.61:5000/hksingleparty_mobile
|
||||
build: ../mobile
|
||||
# user: 1000:1000
|
||||
ports:
|
||||
- 8081:3000
|
||||
- 10004:3000
|
||||
volumes:
|
||||
- ../mobile:/app
|
||||
working_dir: "/app"
|
||||
command: "npm run dev"
|
||||
working_dir: '/app'
|
||||
command: './dev.sh'
|
||||
|
||||
cms_backend:
|
||||
image: 192.168.10.61:5000/demo_minimal_kit_backend
|
||||
@@ -32,22 +32,19 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
- 7272:7272
|
||||
- 5555:5555
|
||||
- 10002:7272
|
||||
- 10003:5555
|
||||
volumes:
|
||||
- ../cms_backend:/app
|
||||
working_dir: "/app"
|
||||
command: "yarn dev"
|
||||
working_dir: '/app'
|
||||
command: './dev.sh'
|
||||
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres:14.1-alpine
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
expose:
|
||||
- "5432"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- '5432'
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
|
Reference in New Issue
Block a user