-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
109 lines (106 loc) · 2.27 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
services:
app:
image: ajikamaludin/php83user:latest
container_name: template-app
working_dir: /var/www/
volumes:
- ./:/var/www
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
mem_limit: 512m
mem_reservation: 128M
cpus: 0.5
networks:
- template
nginx:
image: nginx:1.17-alpine
container_name: template-nginx
ports:
- 8000:80
volumes:
- ./:/var/www
- ./default.conf:/etc/nginx/conf.d/default.conf
mem_limit: 512m
mem_reservation: 128M
cpus: 0.5
networks:
- template
mariadb:
image: mariadb:latest
container_name: template-mariadb
ports:
- 3306:3306
volumes:
- mariadb:/var/lib/mysql
- ./database:/database
environment:
MARIADB_DATABASE: app
MARIADB_USER: app
MARIADB_PASSWORD: password
MARIADB_ROOT_PASSWORD: password
mem_limit: 512m
mem_reservation: 128M
cpus: 0.5
networks:
template:
ipv4_address: 10.255.255.99
phpmyadmin:
container_name: template-phpmyadmin
depends_on:
- mariadb
image: phpmyadmin
ports:
- "8090:80"
environment:
PMA_HOST: mariadb
MYSQL_ROOT_PASSWORD: password
UPLOAD_LIMIT: '2048M'
networks:
- template
postgresql:
# image: postgres:latest
image: postgres:14-alpine3.17
container_name: template-postgres
restart: always
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
- ./database:/database
environment:
POSTGRES_DB: app
POSTGRES_USER: app
POSTGRES_PASSWORD: password
mem_limit: 512m
mem_reservation: 128M
cpus: 0.5
networks:
template:
ipv4_address: 10.255.255.96
build:
image: node:20-alpine
container_name: template-build
ports:
- 5173:5173
volumes:
- ./:/var/www
working_dir: /var/www
entrypoint: ["npm","run", "dev"]
mem_limit: 1024m
mem_reservation: 128M
cpus: 1
networks:
- template
volumes:
mariadb:
driver: local
postgres:
driver: local
networks:
template:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.255.255.0/24
gateway: 10.255.255.1