Skip to content

Commit 89ab019

Browse files
committed
ADD: docker-compose.prod
1 parent a004435 commit 89ab019

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

docker-compose.prod.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: '3.8'
2+
services:
3+
app:
4+
build:
5+
context: ./docker/ci4
6+
volumes:
7+
- .:/var/www/html
8+
environment:
9+
CI_ENVIRONMENT: production
10+
networks:
11+
- app-network
12+
13+
nginx:
14+
image: nginx:alpine # Using the alpine version for smaller size
15+
volumes:
16+
- ./public:/var/www/html/public
17+
- ./docker/nginx/nginx.prod.conf:/etc/nginx/conf.d/default.conf
18+
networks:
19+
- app-network
20+
depends_on:
21+
- app
22+
23+
mysql:
24+
image: mysql:5.7
25+
environment:
26+
MYSQL_DATABASE: ${MYSQL_PROD_DATABASE}
27+
MYSQL_USER: ${MYSQL_PROD_USER}
28+
MYSQL_PASSWORD: ${MYSQL_PROD_PASSWORD}
29+
networks:
30+
- app-network
31+
32+
redis:
33+
image: redis:alpine # Using the alpine version for smaller size
34+
networks:
35+
- app-network
36+
37+
networks:
38+
app-network:
39+
driver: bridge
40+
41+
volumes:
42+
mysql-data:

0 commit comments

Comments
 (0)