Skip to content

Commit 44e8ded

Browse files
committed
add react docker web-service
1 parent 15e3448 commit 44e8ded

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ Remove image:
8585
```bash
8686
$ docker rmi $(docker images -q)
8787
```
88+
Export local environment:
89+
```bash
90+
$ export REACT_APP_USERS_SERVICE_URL=HTTP://IP_DOCKER_APP_USER
91+
```
92+
8893
---
8994
Access database via psql:
9095
```bash

docker-compose.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,23 @@ services:
3939
users-service:
4040
condition: service_started
4141
links:
42-
- users-service
42+
- users-service
43+
44+
45+
web-service:
46+
container_name: web-service
47+
build:
48+
context: https://github.com/repodevs/flask-microservices-client.git
49+
args:
50+
- NODE_ENV=development
51+
- REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL}
52+
ports:
53+
- '9000:9000' # expose ports - HOST:CONTAINER
54+
environment:
55+
- NODE_ENV=development
56+
- REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL}
57+
depends_on:
58+
users-service:
59+
condition: service_started
60+
links:
61+
- users-service

0 commit comments

Comments
 (0)