Create a monica app with docker-compose
This commit is contained in:
66
docker-compose.yml
Normal file
66
docker-compose.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
app:
|
||||
build: ./monica
|
||||
image: monica
|
||||
env_file: ./monica/.env
|
||||
volumes:
|
||||
- data:/var/www/html/storage
|
||||
- monica-public:/var/www/html/public
|
||||
restart: always
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=secret
|
||||
- MYSQL_DATABASE=monica
|
||||
- MYSQL_USER=homestead
|
||||
- MYSQL_PASSWORD=secret
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
restart: always
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- data:/var/www/html/storage:ro
|
||||
- certs:/etc/nginx/certs:ro
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- monica-public:/var/www/html/public:ro
|
||||
depends_on:
|
||||
- app
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
networks:
|
||||
- proxy-tier
|
||||
- default
|
||||
depends_on:
|
||||
- omgwtfssl
|
||||
|
||||
omgwtfssl:
|
||||
image: paulczar/omgwtfssl
|
||||
restart: "no"
|
||||
volumes:
|
||||
- certs:/certs
|
||||
environment:
|
||||
- SSL_SUBJECT=personel.scarif.local
|
||||
- CA_SUBJECT=chris@scarif.local
|
||||
- SSL_KEY=/certs/personel.scarif.local.key
|
||||
- SSL_CSR=/certs/personel.scarif.local.csr
|
||||
- SSL_CERT=/certs/personel.scarif.local.crt
|
||||
networks:
|
||||
- proxy-tier
|
||||
|
||||
volumes:
|
||||
data:
|
||||
db:
|
||||
certs:
|
||||
monica-public:
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
Reference in New Issue
Block a user