Skip to content

Commit aa97624

Browse files
committed
added docker-compose.yml
1 parent b341bdc commit aa97624

File tree

3 files changed

+21
-52
lines changed

3 files changed

+21
-52
lines changed

data/docker/compose.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="btn btn-success my-1" onclick="fetch_path('swarm/compose/index.md')">
2+
swarm / compose
3+
</div>

data/swarm/compose/index.md

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -55,61 +55,18 @@ secrets:
5555
```
5656
5757
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`
6260
```yaml
63-
version: "3.3"
61+
version: "3.8"
6462
6563
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"
11370
```
11471

11572

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: "3.8"
2+
3+
services:
4+
app:
5+
# image: asim3/notes:latest
6+
build:
7+
context: .
8+
ports:
9+
- "3000:80"

0 commit comments

Comments
 (0)