Skip to content

Instantly share code, notes, and snippets.

@vickywane
Created May 15, 2020 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vickywane/9b28f6b64cd481c4ca57c9028ffe96ed to your computer and use it in GitHub Desktop.
Save vickywane/9b28f6b64cd481c4ca57c9028ffe96ed to your computer and use it in GitHub Desktop.
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