File tree Expand file tree Collapse file tree 3 files changed +21
-52
lines changed Expand file tree Collapse file tree 3 files changed +21
-52
lines changed Original file line number Diff line number Diff line change
1
+ < div class ="btn btn-success my-1 " onclick ="fetch_path('swarm/compose/index.md') ">
2
+ swarm / compose
3
+ </ div >
Original file line number Diff line number Diff line change @@ -55,61 +55,18 @@ secrets:
55
55
` ` `
56
56
57
57
58
- # !old
59
- ## services
60
- ` mkdir -p my_compose_dir/`
61
- ` nano my_compose_dir/docker-compose.yml`
58
+ ## build
59
+ ` nano docker-compose.yml`
62
60
` ` ` yaml
63
- version: "3.3 "
61
+ version: "3.8 "
64
62
65
63
services:
66
- my-service:
67
- image: asim3/whoami:1.3
68
- # OR
69
- # build: ./my_docker_file/
70
-
71
- deploy:
72
- reblicas:
73
-
74
- restart: unless-stopped
75
- container_name: wp
76
- networks:
77
- - backend
78
- ports:
79
- - "8000:80"
80
- volumes:
81
- - ./my-php/:/var/www/html/
82
- - my_compose-volume:/var/www/html/
83
- command: --api.insecure=true --providers.docker
84
- environment:
85
- MYSQL_DATABASE: exampledb
86
- MYSQL_USER: exampleuser
87
- MYSQL_PASSWORD: examplepass
88
- labels:
89
- - "traefik.enable=true"
90
- - "traefik.entrypoints=web"
91
- ` ` `
92
-
93
-
94
- # # volumes
95
- ` ` ` yaml
96
- volumes:
97
- my_compose-volume:
98
- driver: local
99
- driver_opts:
100
- type: 'none'
101
- o: 'bind'
102
- device: '/var/asim-compose-volume'
103
- ` ` `
104
-
105
-
106
- # # networks
107
- ` ` ` yaml
108
- networks:
109
- web:
110
- external: true
111
- backend:
112
- external: false
64
+ app:
65
+ # image: asim3/notes:latest
66
+ build:
67
+ context: .
68
+ ports:
69
+ - "3000:80"
113
70
` ` `
114
71
115
72
Original file line number Diff line number Diff line change
1
+ version : " 3.8"
2
+
3
+ services :
4
+ app :
5
+ # image: asim3/notes:latest
6
+ build :
7
+ context : .
8
+ ports :
9
+ - " 3000:80"
You can’t perform that action at this time.
0 commit comments