forked from govpf/mes-demarches
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (114 loc) · 2.73 KB
/
docker-compose.yml
File metadata and controls
120 lines (114 loc) · 2.73 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3.3'
#------------------------------------------------------------
# This docker compose describes the two services running on
# top of Rails.
# To work, this configuration requires
# - a running Postgress instance
# - environment variables defined via .env file
#
# IMAGE : name of the docker image to run (sipf/mes-demarches)
# TAG : Tag of the image to run (eg master or devpf or b38)
#
# APP_HOST: host:port pointing to the application to allows creation of absolute links
#
# API_ISPF_USER: ISPF API configuration
# API_ISPF_PASSWORD
#
# DB_DATABASE: database configuration
# DB_HOST
# DB_USERNAME
# DB_PASSWORD
#
# NETWORK_SLOT: Optional, default to 0, Number between 0 and 255 allowing to run multiple env (dev, staging)
#
# MAILJET_API_KEY:
# MAILJET_SECRET_KEY: MAILJET configuration
#
#-------------------------------------------------------------
services:
app:
image: ${IMAGE}:${TAG:-latest}
container_name: app-${ENV:-dev}
ports:
- ${PORT}:3000
environment:
- APP_HOST
- DB_DATABASE
- DB_HOST
- DB_USERNAME
- DB_PASSWORD
- API_ISPF_USER
- API_ISPF_PASSWORD
- GITHUB_CLIENT_ID
- GITHUB_CLIENT_SECRET
- CLAMD_TCP_HOST=clamav
- CLAMD_TCP_PORT=3310
volumes:
- md-data-files:/app/storage
- md-temp-files:/app/tmp
#----- to set the timezone to the same as the host
# - /etc/localtime:/etc/localtime:ro
networks:
- md-network
worker:
image: ${IMAGE}:${TAG}
entrypoint: ["bundle", "exec"]
command: rails jobs:work
container_name: worker-${ENV:-dev}
environment:
- APP_HOST
- DB_DATABASE
- DB_HOST
- DB_USERNAME
- DB_PASSWORD
- MAILJET_API_KEY
- MAILJET_SECRET_KEY
- CLAMD_TCP_HOST=clamav
- CLAMD_TCP_PORT=3310
volumes:
- md-data-files:/app/storage
#----- to set the timezone to the same as the host
# - /etc/localtime:/etc/localtime:ro
networks:
- md-network
clamav:
image: tiredofit/clamav
container_name: clamav-${ENV:-dev}
ports:
- 3310:3310
volumes:
- clamav-db:/data
- clamav-logs:/var/log/clamav
networks:
- md-network
volumes:
md-data-files:
driver: local
driver_opts:
type: none
device: $ROOT/data
o: bind
md-temp-files:
driver: local
driver_opts:
type: none
device: $ROOT/tmp
o: bind
clamav-db:
driver: local
driver_opts:
type: none
device: $ROOT/clamav/db
o: bind
clamav-logs:
driver: local
driver_opts:
type: none
device: $ROOT/clamav/log
o: bind
networks:
md-network:
driver: bridge
ipam:
config:
- subnet: 10.5.${NETWORK_SLOT:-0}.0/24