-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (36 loc) · 1.99 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: "3"
services:
APP1:
container_name: DOCKER_DEMO_APP_1
image: blackboardhub.ddns.net/bbdn/appn:1.5
# Note the ports format is host:container - you may have many containers which use the same container port (e.g.:8080), but you can have only one use per host port (e.g. only one 80, only one 81, etc.)
# Use the below ports setting if exposing service on specific ports. # If exposing service in a Swarm or using reverse proxy then only provide the container portion as shown below.
ports: #use ports when standalone - otherwise comment out this and the e next line and uncomment the 'export:' block
- 80:6100 # specific host:container port - do not use with export
#export:
# - 6100 # Docker provides host port, container port specified in app config. proxied container access based on service name e.g.: https://<service name:port>/... https://APP1:6100/...
networks: #use only if not joining an existing network - see below network section.
- skynet #you'll want this to be the same as your nginx network.
deploy:
replicas: 2
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
placement:
constraints: [node.role == worker]
restart: unless-stopped # keep it running unless you explicitly stop it
environment:
- APP_NAME=_APP_007
- APP_PATH=/a7
- APP_VERSION_PATH=/a7/weebles
- APP_VERSION=7
- APP_PORT=6100 #should be above container port
command: npm start
networks:
skynet: #match above if not using an existing shared network
# if proxy and shared network then comment the above line and uncomment the below block
#default:
# external:
# name: dockerdemo_skynet #created manually via docker network create dockerdemo_skynet or in a compose.yaml doc like here.