-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
71 lines (68 loc) · 1.63 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: '3'
services:
db:
image: mariadb:latest
container_name: ffrsam-db
volumes:
- ${DATA_DIR}:/var/lib/mysql
- ./database/rsam.sql:/docker-entrypoint-initdb.d/init.sql
expose:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: rsam
restart: always
logging:
driver: json-file
options:
max-size: '10m'
backend:
depends_on:
- db
build:
context: ./backend
dockerfile: back.Dockerfile
container_name: ffrsam-backend
volumes:
- ./backend/src:/opt/ffrsam
- ${IMAGE_DIR}:/images
links:
- db
environment:
DB_HOST: db
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
IMAGE_WIDTH: ${IMAGE_WIDTH}
IMAGE_HEIGHT: ${IMAGE_HEIGHT}
restart: always
logging:
driver: json-file
options:
max-size: '10m'
frontend:
depends_on:
- db
build:
context: ./frontend
dockerfile: front.Dockerfile
container_name: ffrsam-frontend
volumes:
- ./frontend/index.html:/var/www/html/index.html
- ./frontend/web:/var/www/html/ffrsam
- ./frontend/web/favicon.ico:/var/www/html/favicon.ico
- ${IMAGE_DIR}:/var/www/html/images
ports:
- ${WEB_PORT}:80
links:
- 'db'
environment:
DB_HOST: db
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
restart: always
logging:
driver: json-file
options:
max-size: '10m'