-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.yml
77 lines (75 loc) · 1.72 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: "3.9"
services:
#aplicação web (PHP+NGINX)
web:
image: urnau/php-community:8.0.19-fpm-nginx
# image: urnau/php-community:latest
# utilizado quando vamos contruir uma nova imagem
build:
context: .
dockerfile: ./Dockerfile
networks:
- net_principal
volumes:
- ./applications:/var/www
- ./docker/nginx/sites:/etc/nginx/sites-available
ports:
- "80:80" #http
- "443:443" #https
- "8080:8080"
- "8081:8081"
- "8082:8082"
- "8083:8083"
- "8084:8084"
- "8085:8085"
- "8086:8086"
- "8087:8087"
- "8088:8088"
- "8089:8089"
depends_on:
- postgres
- redis
- mysql
# aplicação Postgres
postgres:
image: postgres:14.3-alpine
restart: always
networks:
- net_principal
volumes:
- POSTGRES_VOLUME_EXEMPLO=/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: senha_exemplar_postgres
POSTGRES_DB: db_postgres_exemplo
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 20000:5432
# aplicação MySQL
mysql:
image: mysql:8.0.29-debian
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- MYSQL_VOLUME_EXEMPLO=/var/lib/mysql
#- 'MYSQL_VOLUME_EXEMPLO:/var/lib/mysql'
environment:
MYSQL_ROOT_PASSWORD: senha_exemplar_mysql
MYSQL_DATABASE: db_mysql_exemplo
networks:
- net_principal
ports:
- 30000:3306
# aplicação Redis
redis:
image: redis:7-alpine
restart: always
networks:
- net_principal
ports:
- 6379:6379
networks:
net_principal:
volumes:
POSTGRES_VOLUME_EXEMPLO:
MYSQL_VOLUME_EXEMPLO:
driver: local