File tree Expand file tree Collapse file tree 4 files changed +36
-6
lines changed Expand file tree Collapse file tree 4 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 1
- # Docker compose managaged test harness
1
+ # Docker compose managed test harness
2
2
3
3
Example for a blog post about nginx docker compose
4
4
5
5
## Setup
6
6
7
- To run this you will execute:
7
+ To run this you will execute one of the following commands depending on your build source:
8
+
9
+ ### Local Build
10
+
11
+ To build from local directories, run:
12
+
13
+ ``` bash
14
+ ./build_local.sh
15
+ ```
16
+
17
+ ### GitHub Build
18
+
19
+ To build from GitHub repositories, run:
8
20
9
21
``` bash
10
- docker compose up --build
22
+ ./build_github.sh
11
23
```
12
24
13
25
Once the container is up and running, you can hit ` http://localhost:8089/ ` it ` / ` will route you to FE react project by default.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Set environment variables for GitHub build
4
+ export FRONTEND_BUILD_CONTEXT=https://${GH_TOKEN} @${FRONTEND_REPO_URL} # ${FRONTEND_REF}
5
+ export API_BUILD_CONTEXT=https://${GH_TOKEN} @${API_REPO_URL} # ${API_REF}
6
+ export BACKEND_BUILD_CONTEXT=https://${GH_TOKEN} @${BACKEND_REPO_URL} # ${BACKEND_REF}
7
+
8
+ # Run Docker Compose
9
+ docker-compose -f compose.yaml up --build
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Set environment variables for local build
4
+ export FRONTEND_BUILD_CONTEXT=./repo_refs/react1-app
5
+ export API_BUILD_CONTEXT=./repo_refs/rails-app
6
+ export BACKEND_BUILD_CONTEXT=./repo_refs/react2-app
7
+
8
+ # Run Docker Compose
9
+ docker-compose -f compose.yaml up --build
Original file line number Diff line number Diff line change 1
1
services :
2
2
frontend :
3
- build : https://${GH_TOKEN}@${FRONTEND_REPO_URL}#${FRONTEND_REF }
3
+ build : ${FRONTEND_BUILD_CONTEXT }
4
4
ports :
5
5
- 3000
6
6
networks :
@@ -9,7 +9,7 @@ services:
9
9
- PUBLIC_URL=${FRONTEND_PUBLIC_URL}
10
10
- WDS_SOCKET_PORT=${WDS_SOCKET_PORT}
11
11
api :
12
- build : https://${GH_TOKEN}@${API_REPO_URL}#${API_REF }
12
+ build : ${API_BUILD_CONTEXT }
13
13
ports :
14
14
- 3000
15
15
networks :
@@ -46,7 +46,7 @@ services:
46
46
timeout : 5s
47
47
retries : 3
48
48
backend :
49
- build : https://${GH_TOKEN}@${BACKEND_REPO_URL}#${BACKEND_REF }
49
+ build : ${BACKEND_BUILD_CONTEXT }
50
50
ports :
51
51
- 3000
52
52
environment :
You can’t perform that action at this time.
0 commit comments