-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
58 lines (50 loc) · 1.08 KB
/
docker-compose.yaml
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
# docker-compose.yml
version: "3.7"
services:
# Nginx Proxy
app:
container_name: app
image: nginx:1.25.1-alpine-slim
ports:
- "8080:80"
#- "443:443"
# restart: unless-stopped
volumes:
# - ./.docker/nginx.conf:/etc/nginx/nginx.conf:ro
- ./.docker/nginx:/etc/nginx/conf.d:ro
# Redis for caching
redis:
image: redis
ports:
- "6379:6379"
# Image building before deployment
_build:
image: ids/codesample
container_name: build
command: ['echo', 'Image Build Completed!!']
build:
context: ./
dockerfile: Dockerfile
target: app_php
# App Servers
server_1: &appService
image: ids/codesample
container_name: server_1
# restart: unless-stopped
working_dir: /srv/app
command: php server.php
volumes:
- ./:/srv/app
depends_on:
- _build
server_2:
<<: *appService
container_name: server_2
server_3:
<<: *appService
container_name: server_3
server_4:
<<: *appService
container_name: server_4
# volumes:
# nginx_cache: