forked from Bramas/hotcrp-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
87 lines (80 loc) · 2.79 KB
/
docker-compose.yaml
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
# Base config that supports multiple deployments on same host
#
# Includes own SMTP, nginx, and php services
#
# By default `docker-compose` commands will include the override
# config which will also bring up a database instance, unless
# only this file is specified, e.g.:
#
# `docker-compose -f docker-compose.yaml up -d`
version: '3'
services:
# If you want to test the mail server and see
# in a web interface what are the sent mail, uncomment this
# and comment the other smtp container.
# The web interface is accessible at localhost:9002
#smtp:
# image: mailhog/mailhog:v1.0.1
# restart: always
# expose:
# - "25"
# environment:
# MH_SMTP_BIND_ADDR: 0.0.0.0:25
# ports:
# - 9002:8025
smtp:
image: juanluisbaptiste/postfix:1.7.1
restart: always
expose:
- "25"
volumes:
- ./mail-spool:/var/spool/postfix
# you can store mail log in a volume
# (but create the file locally before startup)
#- ./logs/smtp/maillog:/var/log/maillog
environment:
SMTP_SERVER: ${SMTP_SERVER}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
SERVER_HOSTNAME: ${SERVER_HOSTNAME}
php:
build:
context: ./docker/php
user: 1000:1000
expose:
- 9000
restart: always
volumes:
- ./app:/srv/www/api:ro
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./docker/php/msmtprc:/etc/msmtprc
- ./docker/php/php.conf:/usr/local/etc/php/conf.d/custom.ini:ro
- ./logs/php:/var/log
- ./docs:/docs
environment:
MYSQL_USER: ${HOTCRP_DB_NAME:-hotcrp}
MYSQL_PASSWORD: ${HOTCRP_DB_PASSWORD:-hotcrppwd}
MYSQL_DATABASE: ${HOTCRP_DB_NAME:-hotcrp}
MYSQL_HOST: ${HOTCRP_DB_HOST:-mysql}
HOTCRP_PAPER_SITE: ${HOTCRP_PAPER_SITE}
HOTCRP_SHORT_NAME: ${HOTCRP_SHORT_NAME}
HOTCRP_LONG_NAME: ${HOTCRP_LONG_NAME}
HOTCRP_CONTACT_NAME: ${HOTCRP_CONTACT_NAME}
HOTCRP_EMAIL_CONTACT: ${HOTCRP_EMAIL_CONTACT}
HOTCRP_EMAIL_FROM: ${HOTCRP_EMAIL_FROM}
HOTCRP_FILESYSTEM_DOCS: ${HOTCRP_FILESYSTEM_DOCS}
depends_on:
- smtp
nginx:
image: nginx:alpine
restart: always
ports:
- ${HOTCRP_PORT:-9001}:443
volumes:
- ./app:/srv/www/api
- ./logs/nginx:/var/log/nginx
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- php