-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
39 lines (37 loc) · 961 Bytes
/
docker-compose-prod.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
services:
chatapp:
depends_on:
- database
build:
context: .
dockerfile: Dockerfile
image: chatapp
container_name: chatapp
ports:
- "9000:9000" # Port for frontend
- "8000:8000" # Port for backend
# volumes:
# - ./frontend:/var/www/frontend:ro
# - ./frontend/apache-config/frontend.conf:/etc/apache2/sites-available/frontend.conf:ro
# - ./backend:/var/www/backend:ro
# - ./backend/apache-config/backend.conf:/etc/apache2/sites-available/backend.conf:ro
networks:
- chatapp
database:
image: mysql:latest
restart: unless-stopped
container_name: database
volumes:
- db-data:/var/lib/mysql
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
networks:
- chatapp
volumes:
db-data:
networks:
chatapp:
driver: bridge