update docker-compose.yml
This commit is contained in:
+39
-25
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user