-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (51 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
52 lines (51 loc) · 1.11 KB
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
services:
database:
container_name: database
image: mysql:8.4.7
restart: always
environment:
MYSQL_DATABASE: ays
MYSQL_USER: ays
MYSQL_PASSWORD: ayspass
MYSQL_ROOT_PASSWORD: ayspass
MYSQL_ROOT_HOST: '%'
MYSQL_PORT: 3307
volumes:
- ./docker/mysql:/var/lib/mysql
ports:
- "127.0.0.1:3307:3306"
networks:
- ays-network
application:
build:
context: .
dockerfile: Dockerfile
container_name: application
restart: on-failure
ports:
- "127.0.0.1:9790:9790"
environment:
- AYS_DB_WRITER_INSTANCE_IP=database
- AYS_DB_WRITER_INSTANCE_PORT=3306
- AYS_DB_READER_INSTANCE_IP=database
- AYS_DB_READER_INSTANCE_PORT=3306
- AYS_CACHE_IP=cache
- AYS_CACHE_PORT=6379
networks:
- ays-network
depends_on:
- database
- cache
cache:
container_name: cache
image: redis:8.4.0
restart: on-failure
volumes:
- ./docker/redis:/data
ports:
- "127.0.0.1:6380:6379"
networks:
- ays-network
networks:
ays-network:
driver: bridge