-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Hi!
I'm probably stupid but I can't connect to the database with laravel. What should I put in the .env file?
I've tried everything:
- port tested: 5432
- host tested: localhost, 127.0.0.0.1, pgsql
this is my docker-composer:
services:
php:
image: swithfr/php:7.2
volumes:
- ".:/var/www/laratest"
nginx:
image: nginx:latest
volumes:
- "./docker/nginx.conf:/etc/nginx/conf.d/default.conf"
links:
- php
ports:
- 8888:80
pg-master:
image: swithfr/pgsql-replication
restart:'always'.
environment:
POSTGRES_USER: "postgres
POSTGRES_PASSWORD:'postgres'.
PGDATA:'/var/lib/postgresql/data/pgdata'
volumes:
- '/var/lib/postgresql/data'
exposes:
- '5432'
pg-slave:
image: swithfr/pgsql-replication
restart:'always'.
environment:
POSTGRES_USER: "postgres
POSTGRES_PASSWORD:'postgres'.
PGDATA:'/var/lib/postgresql/data/pgdata'
REPLICATE_FROM: "pg-master
volumes:
- '/var/lib/postgresql/data'
exposes:
- '5432'
links:
- "pg-master
swithfr/pgsql-replication is a copy of your Dockerfile with just the addition of these lines
RUN apt-get update
RUN apt-get install iputils-ping -y
Metadata
Metadata
Assignees
Labels
No labels