-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (42 loc) · 1.41 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
47
48
49
50
51
52
53
## Acessar bash do container
# docker exec -it <container id> /bin/sh
# docker exec -it <container id> /bin/bash
## Logs do container
# docker logs -f --tail 1000 ApiBaileysMd
## Removendo todos os containers e imagens de uma só vez
# docker rm $(docker ps -qa)
## Removendo todas as imagens de uma só vez
# docker rmi $(docker images -aq)
## Removendo imagens
# docker rmi <REPOSITORY>
# docker rmi <IMAGE ID>
## Como obter o endereço IP de um contêiner Docker do host
# https://stack.desenvolvedor.expert/appendix/docker/rede.html
# docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <IMAGE ID>
# Criar um contêiner
# docker compose -f docker-compose.yml up --build -d
version: "3.9"
services:
backend:
container_name: ${HOST_NAME:-'ApiBaileysMd'}
hostname: ${HOST_NAME:-'ApiBaileysMd'}
network_mode: bridge
image: alanmartines/mywhatsapp-api-node-baileys-md:${TAG}
build:
context: .
dockerfile: Dockerfile.backend
restart: unless-stopped
env_file: .env
volumes:
- .:/home/ApiBaileysMd:rw
- ${PATCH_TOKENS:-/usr/local/tokensHomologacao}:/usr/local/tokens:rw
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- ${PORT:-9001}:9001
expose:
- ${PORT:-9001}
# logging:
# driver: gelf
# options:
# gelf-address: "udp://${GRAYLOGSERVER:-127.0.0.1}:${GRAYLOGPORT:-12201}"