homepage.js/docker-compose.prod

43 lines
827 B
Plaintext

version: '3'
services:
server:
restart: always
build:
context: .
dockerfile: Dockerfile
volumes:
- './:/opt/code'
env_file: ./.env
environment:
APP_PORT: '${APP_PORT}'
networks:
- homepage
redis:
restart: always
image: redis:alpine
networks:
- homepage
nginx:
image: nginx:alpine
ports:
- '${APP_PORT}:80'
networks:
- homepage
volumes:
- './config/nginx:/etc/nginx'
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