homepage.js/docker-compose.prod

44 lines
858 B
Plaintext
Raw Normal View History

2023-03-11 17:03:39 +01:00
version: '3'
services:
server:
2023-03-12 03:22:48 +01:00
restart: always
2023-03-11 17:03:39 +01:00
build:
context: .
dockerfile: Dockerfile
volumes:
- './:/opt/code'
env_file: ./.env
environment:
APP_PORT: '${APP_PORT}'
networks:
- homepage
redis:
2023-03-12 03:22:48 +01:00
restart: always
2023-03-11 17:03:39 +01:00
image: redis:alpine
networks:
- homepage
2023-06-06 06:09:40 +02:00
nginx:
image: nginx:alpine
ports:
- '${APP_PORT}:80'
networks:
- homepage
volumes:
- './config/nginx:/etc/nginx'
2023-06-06 10:32:32 +02:00
- './public:/var/www:ro'
2023-03-11 17:03:39 +01:00
db:
2023-03-12 03:22:48 +01:00
restart: always
2023-03-11 17:03:39 +01:00
image: postgres:alpine
environment:
POSTGRES_PASSWORD: '${DB_PASSWORD}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_DB: '${DB_DATABASE}'
2023-03-12 02:46:21 +01:00
PGDATA: '/var/lib/pgdata/data'
2023-03-11 17:03:39 +01:00
volumes:
2023-03-12 02:46:21 +01:00
- './data/db:/var/lib/pgdata/data'
2023-03-11 17:03:39 +01:00
networks:
- homepage
networks:
homepage:
driver: bridge