Profiles and cleanup

This commit is contained in:
2022-03-07 18:08:25 -03:00
parent 6a5efba272
commit 1754633475
2 changed files with 13 additions and 2 deletions

View File

@ -1,2 +1,3 @@
COMPOSE_PROFILES=
BASE_URL= BASE_URL=
MYSQL_HOST= MYSQL_HOST=

View File

@ -2,21 +2,29 @@ version: '3'
services: services:
web: web:
profiles:
- app
image: nginx:alpine image: nginx:alpine
container_name: web container_name: web
ports: ports:
- 8080:80 - "8080:80"
volumes: volumes:
- .:/code - .:/code
- ./nginx.conf:/etc/nginx/conf.d/default.conf - ./nginx.conf:/etc/nginx/conf.d/default.conf
php: php:
profiles:
- app
build: . build: .
container_name: php container_name: php
env_file:
- .env
volumes: volumes:
- .:/code - .:/code
db: db:
profiles:
- db
container_name: db container_name: db
image: mariadb:latest image: mariadb:latest
restart: unless-stopped restart: unless-stopped
@ -25,11 +33,13 @@ services:
- dbdata:/var/lib/mysql - dbdata:/var/lib/mysql
adminer: adminer:
profiles:
- db
container_name: adminer container_name: adminer
image: adminer:latest image: adminer:latest
restart: unless-stopped restart: unless-stopped
ports: ports:
- 8083:8080 - "8083:8080"
env_file: .adminer.env env_file: .adminer.env
volumes: volumes: