Files
Docker-Chevereto/projects/prod.yml
2022-10-06 15:31:11 -03:00

84 lines
1.9 KiB
YAML

version: "3.8"
services:
database:
container_name: ${CONTAINER_BASENAME}_database
image: mariadb:focal
networks:
- chevereto
volumes:
- database:/var/lib/mysql
restart: always
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-u",
"root",
"-p$${MYSQL_ROOT_PASSWORD?REQUIRED}",
]
interval: 15s
timeout: 30s
retries: 5
start_period: 15s
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: chevereto
MYSQL_USER: chevereto
MYSQL_PASSWORD: user_database_password
php:
container_name: ${CONTAINER_BASENAME}_php
image: ${TAG_BASENAME}_php
depends_on:
database:
condition: service_healthy
networks:
- chevereto
volumes:
- storage:/var/www/html/images/
- assets:/var/www/html/_assets/
ports:
- 9000
restart: always
environment:
CHEVERETO_DB_HOST: database
CHEVERETO_DB_USER: chevereto
CHEVERETO_DB_PASS: user_database_password
CHEVERETO_DB_PORT: 3306
CHEVERETO_DB_NAME: chevereto
CHEVERETO_HOSTNAME: ${HOSTNAME}
CHEVERETO_HOSTNAME_PATH: ${HOSTNAME_PATH}
CHEVERETO_HTTPS: 0
CHEVERETO_ASSET_STORAGE_TYPE: local
CHEVERETO_ASSET_STORAGE_URL: ${URL_PROD}_assets/
CHEVERETO_ASSET_STORAGE_BUCKET: /var/www/html/_assets/
CHEVERETO_ENCRYPTION_KEY: yUwfiRh6anwqC/sIx3COCIZeMT9rxdbXkMDdfgyrM2M=
http:
container_name: ${CONTAINER_BASENAME}_http
image: ${TAG_BASENAME}_http
depends_on:
- php
networks:
- chevereto
volumes:
- storage:/var/www/html/images/:ro
- assets:/var/www/html/_assets/:ro
- type: bind
source: ${PWD}/httpd/httpd.conf
target: /usr/local/apache2/conf/httpd.conf
ports:
- ${PORT}:80
restart: always
volumes:
database:
assets:
storage:
networks:
chevereto: