homepage.js/docker-compose.prod

37 lines
723 B
Plaintext

version: '3'
services:
server:
restart: always
build:
context: .
dockerfile: Dockerfile
volumes:
- './:/opt/code'
ports:
- '${APP_PORT}:${APP_PORT}'
env_file: ./.env
environment:
APP_PORT: '${APP_PORT}'
networks:
- homepage
redis:
restart: always
image: redis:alpine
networks:
- homepage
db:
restart: always
image: postgres:alpine
environment:
POSTGRES_PASSWORD: '${DB_PASSWORD}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_DB: '${DB_DATABASE}'
PGDATA: '/var/lib/pgdata/data'
volumes:
- './data/db:/var/lib/pgdata/data'
networks:
- homepage
networks:
homepage:
driver: bridge