Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '3'
services:
app:
container_name: oasis_container
build: .
ports:
- 4040:4040
restart: on-failure
volumes:
- api:/usr/src/app/
depends_on:
- postgres
networks:
- oasis
postgres:
image: postgres:latest
container_name: oasis_postgres
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_DB_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- DATABASE_HOST=${POSTGRES_DB_ADDRESS}
ports:
- '5432:5432'
volumes:
- database_postgres:/var/lib/postgresql/data
networks:
- oasis
# pgadmin:
# image: dpage/pgadmin4
# container_name: oasis_pgadmin
# environment:,
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
# depends_on:
# - postgres
# ports:
# - "5050:80"
# networks:
# - oasis
# restart: unless-stopped
volumes:
api:
database_postgres:
# Networks to be created to facilitate communication between containers
networks:
oasis:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment