-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·46 lines (46 loc) · 1.19 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
39
40
41
42
43
44
45
46
version: '3.4'
services:
redis-server:
image: redis
container_name: redis-cache
command: redis-server --requirepass "rediscache"
ports:
- 6378:6379
restart: always
nginx:
restart: always
build:
context: ./nginx
dockerfile: Dockerfile-nginx
image: vishal210893/nginx:1
container_name: nginx-server
ports:
- 3050:80
dockerpoc-1:
build:
# context: specify the location of dockerfile (.(dot) = current working directory)
context: .
# To specify name of dockerfile
dockerfile: dockerfile
image: vishal210893/dockerpoc-1:1
container_name: dockerpoc-1
volumes:
- /home/vishal/Desktop/dockermount:/opt/file
ports:
- 5000:8005
environment:
env_value: Server 1
restart: always
dockerpoc-2:
build:
context: /home/vishal/Desktop/DockerPoc-2
dockerfile: Dockerfile
image: vishal210893/dockerpoc-2:1
container_name: dockerpoc-2
ports:
- 5001:8006
environment:
env_value: Server 2
# We can specify starting command in docker-compose also instead of in dockerfile
entrypoint: [ "sh", "-c", "java -jar /opt/aims/dockerpoc-2.jar"]
restart: always