-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (82 loc) · 2.19 KB
/
docker-compose.yml
File metadata and controls
87 lines (82 loc) · 2.19 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
services:
app:
build:
context: .
dockerfile: docker/Dockerfile
args:
- RUBY_VERSION=3.1
tty: true
container_name: ${COMPOSE_PROJECT_NAME}_app
restart: always
hostname: app
working_dir: /var/www/html
expose:
- "3000" # Rails default port
volumes:
- ./:/var/www/html:cached
- ./docker/config/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
- ./vendor/bundle:/var/www/html/vendor/bundle
environment:
- RAILS_ENV=${RAILS_ENV}
links:
- database
command: bash -c "bin/rails server -b '0.0.0.0'"
nginx:
image: nginx:1.19.0
container_name: ${COMPOSE_PROJECT_NAME}_nginx
restart: always
tty: true
expose:
- "80"
ports:
- ${DOCKER_NGINX_PORT}:80
volumes:
- ./:/var/www/html:cached
- ./docker/config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/config/conf.d/:/etc/nginx/conf.d/
- ./docker/logs:/var/log/nginx/
depends_on:
- app
# The Database
database:
image: postgres:15
container_name: ${COMPOSE_PROJECT_NAME}_db
restart: always
platform: linux/x86_64
volumes:
- ./docker/postgresql:/var/lib/postgresql/data:rw
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- PGDATA=/var/lib/postgresql/data
expose:
- "5432"
ports:
- ${DOCKER_DATABASE_PORT}:5432
# The Mailhog client
mailhog:
image: mailhog/mailhog
container_name: ${COMPOSE_PROJECT_NAME}_mail
restart: always
logging:
driver: 'none' # disable saving logs
ports:
- ${DOCKER_MAILHOG_SMTP_SERVER_PORT}:1025 # smtp server
- ${DOCKER_MAILHOG_WEB_UI_PORT}:8025 # web ui
# The S3 local
s3:
image: minio/minio
container_name: ${COMPOSE_PROJECT_NAME}_s3
restart: always
ports:
- ${DOCKER_S3_SMTP_SERVER_PORT}:9000 # smtp server
- ${DOCKER_S3_WEB_UI_PORT}:9001 # web ui
volumes:
- ./storage/minio:/data
environment:
MINIO_ACCESS_KEY: minio_access_key
MINIO_SECRET_KEY: minio_secret_key
HOST_NAME: s3.localhost
command: server --console-address :9001 --address 0.0.0.0:9000 /data
volumes:
bundle: