diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index cfd5591b..421078b5 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -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 \ No newline at end of file + volumes: + - postgres-database:/var/lib/postgresql/data + networks: + - demo +volumes: + postgres-database: + + +networks: + demo: + driver: bridge \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 90645b1a..a621dc9a 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -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