-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (49 loc) · 1.1 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
version: '3.8'
services:
nginx:
image: nginx:1.17-alpine
container_name: nginx
volumes:
- "./src/:/var/www/html"
- "./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf"
ports:
- "80:80"
- "443:443"
restart: always
depends_on:
- php
redis:
image: "redis:alpine"
container_name: redis
command: [ "redis-server", "--requirepass", "${REDIS_PASSWORD}" ]
ports:
- 6379:6379
env_file:
- ".env"
volumes:
- './.docker/redis:/redis'
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
restart: always
postgres:
image: "postgres:12.3"
container_name: postgres
env_file:
- ".env"
ports:
- 1003:5432
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./.docker/postgresql/data:/var/lib/postgresql/data
php:
build:
context: ./.docker/php
dockerfile: Dockerfile
container_name: php
restart: always
volumes:
- "./src:/var/www/html"