update docker-compose.yml

This commit is contained in:
2022-04-25 11:07:56 +05:30
parent 8e5020e3d2
commit 89e26ea9b9
2 changed files with 44 additions and 30 deletions
+39 -25
View File
@@ -1,34 +1,48 @@
version: "3.7"
services:
app:
# build:
# args:
# user: nobi
# uid: 1000
# context: ./app
# dockerfile: Dockerfile
image: buzzerburger/test
container_name: app
restart: unless-stopped
working_dir: /var/www/
depends_on :
- database
networks:
- demo
app:
build:
args:
COMPOSER_ENV : development
context: ./app
dockerfile: Dockerfile
nginx:
image: nginx
container_name: webserver
restart: unless-stopped
ports:
- 8080:80
networks:
- demo
volumes:
- ./app/code:/var/www
- /vendor
environment:
- COMPOSER_ENV=development
nginx:
volumes:
- ./app/code:/var/www
- ./nginx:/etc/nginx/conf.d:ro
depends_on:
- app
- database
database:
database:
image: postgres
container_name: database
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: test
ports:
- 5430:5432
volumes:
- postgres-database:/var/lib/postgresql/data
networks:
- demo
volumes:
postgres-database:
networks:
demo:
driver: bridge
+5 -5
View File
@@ -3,11 +3,11 @@ services:
app:
build:
args:
COMPOSER_ENV : production
context: ./app
dockerfile: Dockerfile
# build:
# args:
# COMPOSER_ENV : production
# context: ./app
# dockerfile: Dockerfile
environment:
- COMPOSER_ENV=production