Skip to content

Commit ef007dc

Browse files
committed
wip11
1 parent 2916618 commit ef007dc

File tree

1 file changed

+129
-0
lines changed

1 file changed

+129
-0
lines changed

.github/workflows/docker-build.yml

+129
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,135 @@ jobs:
121121
IMAGE_TAG="${{ needs.build.outputs.image_digest }}"
122122
sed -i "s|nasa-ammos/common-workflow-service:2.6.0|${IMAGE_TAG}|g" docker-compose.test.yml
123123
124+
# Create a new Docker Compose file with the updated network configuration
125+
cat > docker-compose.test.yml << EOL
126+
version: "3.2"
127+
128+
services:
129+
db:
130+
restart: always
131+
image: mariadb:10.11
132+
container_name: cws-db
133+
ports:
134+
- "3306:3306"
135+
command: mysqld --max-connections=2000 --transaction-isolation=READ-COMMITTED
136+
environment:
137+
- MYSQL_DATABASE=cws
138+
- MYSQL_ROOT_PASSWORD=test
139+
- TZ=America/Los_Angeles
140+
healthcheck:
141+
test: '/usr/bin/mysql --user=root --password=test --execute "SHOW DATABASES;"'
142+
interval: 3s
143+
timeout: 1s
144+
retries: 5
145+
networks:
146+
- external-network
147+
es:
148+
labels:
149+
com.example.service: "es"
150+
com.example.description: "For searching and indexing data"
151+
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
152+
container_name: cws-es
153+
ports:
154+
- "9200:9200"
155+
- "9300:9300"
156+
environment:
157+
- MAX_MAP_COUNT=262144
158+
- discovery.type=single-node
159+
- cluster.name=docker-cluster
160+
- xpack.security.enabled=false
161+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
162+
networks:
163+
- external-network
164+
healthcheck:
165+
test:
166+
[
167+
"CMD-SHELL",
168+
"curl --silent --fail localhost:9200/_cluster/health || exit 1",
169+
]
170+
interval: 5s
171+
timeout: 2s
172+
retries: 12
173+
cws:
174+
container_name: cws-console
175+
labels:
176+
com.example.service: "cws-server"
177+
com.example.description: "Common Workflow Service"
178+
image: ${IMAGE_TAG}
179+
depends_on:
180+
- db
181+
- es
182+
- ldapsearch
183+
ports:
184+
- "38080:38080"
185+
- "38443:38443"
186+
- "31616:31616"
187+
hostname: cws-console
188+
environment:
189+
- DB_HOST=db
190+
- DB_USER=root
191+
- DB_PW=test
192+
- ES_PROTOCOL=http
193+
- ES_HOST=es
194+
- ES_PORT=9200
195+
healthcheck:
196+
test:
197+
[
198+
"CMD-SHELL",
199+
"curl -k --silent --fail https://localhost:38443/cws-ui/login || exit 1",
200+
]
201+
interval: 5s
202+
timeout: 2s
203+
retries: 12
204+
volumes:
205+
- ./config.properties:/home/cws_user/config.properties:ro
206+
- ~/.cws/creds:/root/.cws/creds:ro
207+
- console-logs-volume:/home/cws_user/cws/server/apache-tomcat-9.0.75/logs
208+
networks:
209+
- external-network
210+
cws-worker:
211+
container_name: cws-worker1
212+
labels:
213+
com.example.service: "cws-worker1"
214+
com.example.description: "Common Workflow Service"
215+
image: ${IMAGE_TAG}
216+
depends_on:
217+
- db
218+
- es
219+
- cws
220+
- ldapsearch
221+
hostname: cws-worker1
222+
environment:
223+
- DB_HOST=db
224+
- DB_USER=root
225+
- DB_PW=test
226+
- ES_PROTOCOL=http
227+
- ES_HOST=es
228+
- ES_PORT=9200
229+
volumes:
230+
- ./worker-config.properties:/home/cws_user/config.properties:ro
231+
- ~/.cws/creds:/root/.cws/creds:ro
232+
- worker1-logs-volume:/home/cws_user/cws/server/apache-tomcat-9.0.75/logs
233+
networks:
234+
- external-network
235+
ldapsearch:
236+
container_name: ldapsearch_container
237+
image: ghcr.io/nasa-ammos/common-workflow-service/openldap:v2.6
238+
ports:
239+
- 389:389
240+
networks:
241+
- external-network
242+
243+
volumes:
244+
console-logs-volume:
245+
worker1-logs-volume:
246+
247+
networks:
248+
external-network:
249+
name: cws-network
250+
external: true
251+
EOL
252+
124253
- name: Start containers with Docker Compose
125254
run: |
126255
# Start services

0 commit comments

Comments
 (0)