Skip to content

Commit 70aeab3

Browse files
author
Vien
committed
add redis and add google nginx
1 parent eb71a55 commit 70aeab3

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

docker-compose.yml

+18-3
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,37 @@ services:
3030
restart: always
3131
working_dir: /apps
3232

33+
# Redis
34+
redis:
35+
image: redis:latest
36+
ports:
37+
- 6379:6379
38+
container_name: redis
39+
# environment:
40+
# REDIS_PASSWORD: "luvvien"
41+
command: redis-server --requirepass luvvien
42+
volumes:
43+
- ./services/redis/data:/data
44+
restart: always
45+
3346
# nginx
3447
nginx:
35-
image: nginx:latest
48+
image: pagespeed/nginx-pagespeed
3649
container_name: nginx
3750
ports:
3851
- 80:80
3952
- 443:443
4053
links:
4154
- mysql
55+
- nginx
4256
depends_on:
4357
- php-fpm
4458
- mysql
59+
- redis
4560
volumes:
4661
- ./apps:/apps
47-
- ./services/nginx/config/conf.d:/etc/nginx/conf.d:ro
48-
- ./services/nginx/config/cert:/etc/nginx/cert:ro
62+
- ./services/nginx/config/conf.d:/etc/nginx/conf.d
63+
- ./services/nginx/config/cert:/etc/nginx/cert
4964
- ./services/nginx/config/nginx.conf:/etc/nginx/nginx.conf
5065
- ./logs/nginx:/var/log/nginx
5166
restart: always

services/redis/data/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ignore all except .gitignore file
2+
*
3+
!.gitignore

0 commit comments

Comments
 (0)