-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
124 lines (120 loc) · 3.51 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
version: '3.6'
services:
elixir-frontend:
container_name: elixir-frontend
build:
context: $FRONTEND_DIR
dockerfile: Dockerfile
environment:
VIRTUAL_HOST: elixir.local
volumes:
- '$FRONTEND_DIR:/var/www:rw'
networks:
elixir-net:
ipv4_address: 172.60.1.10
elixir-backend:
container_name: elixir-backend
build:
context: $BACKEND_DIR
dockerfile: Dockerfile
depends_on:
- elixir-pgadmin
- elixir-pma
environment:
MIX_ENV: dev
PORT: $BACKEND_PORT
VIRTUAL_HOST: api.elixir.local
volumes:
- '$BACKEND_DIR:/app:rw'
networks:
elixir-net:
ipv4_address: 172.60.1.11
# elixir-testing:
# container_name: elixir-testing
# build:
# context: $TESTING_DIR
# dockerfile: Dockerfile
# restart: unless-stopped
# volumes:
# - '$TESTING_DIR:/var/www/:rw'
# - /var/www/node_modules
# extra_hosts:
# - 'elixir.local api.elixir.local:172.60.0.1'
# networks:
# elixir-net:
# ipv4_address: 172.60.1.12
elixir-mysql:
container_name: elixir-mysql
image: 'mariadb:latest'
restart: unless-stopped
ports:
- '$MYSQL_PORT:$MYSQL_PORT'
volumes:
- type: bind
source: $MYSQL_DIR
target: /var/lib/mysql
environment:
TZ: Europe/Riga
LANG: en_US.UTF-8
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
INIT_TOKUDB: 1
INIT_ROCKSDB: 0
networks:
elixir-net:
ipv4_address: 172.60.1.13
command: '--sql-mode= --server-id=1 --log-bin=mysql-bin --expire_logs_days=3 ${MYSQL_CMD_ARGS}'
elixir-pma:
container_name: elixir-pma
image: 'phpmyadmin/phpmyadmin'
restart: always
depends_on:
- elixir-mysql
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
PMA_HOST: elixir-mysql
PMA_PORT: $MYSQL_PORT
networks:
elixir-net:
ipv4_address: 172.60.1.14
elixir-postgres:
container_name: elixir-postgres
image: 'postgres:latest'
restart: unless-stopped
ports:
- '$POSTGRES_PORT:$POSTGRES_PORT'
volumes:
- type: bind
source: $POSTGRES_DIR
target: /var/lib/postgres
environment:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
networks:
elixir-net:
ipv4_address: 172.60.1.15
elixir-pgadmin:
container_name: elixir-pgadmin
image: dpage/pgadmin4:latest
restart: unless-stopped
depends_on:
- elixir-postgres
ports:
- "5050:80"
volumes:
- /data/pgadmin:/root/.pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: $PGADMIN_EMAIL
PGADMIN_DEFAULT_PASSWORD: $POSTGRES_PASSWORD
networks:
elixir-net:
ipv4_address: 172.60.1.16
networks:
elixir-net:
ipam:
driver: default
config:
- subnet: 172.60.0.0/16