fix docker compose file and docker
This commit is contained in:
52
docker-compose.yml
Normal file
52
docker-compose.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
networks:
|
||||
portfolio:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
pg_date: null
|
||||
|
||||
|
||||
services:
|
||||
nginx:
|
||||
networks:
|
||||
- portfolio
|
||||
ports:
|
||||
- ${PORT-8001}:80
|
||||
volumes:
|
||||
- ./resources/layout/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./resources:/usr/share/nginx/html/resources/
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile.nginx
|
||||
depends_on:
|
||||
- web
|
||||
|
||||
web:
|
||||
networks:
|
||||
- portfolio
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile.web
|
||||
restart: always
|
||||
command: sh resources/scripts/entrypoint.sh
|
||||
environment:
|
||||
- PYTHONPYCACHEPREFIX=/var/cache/pycache
|
||||
|
||||
volumes:
|
||||
- './:/code'
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: postgres:16
|
||||
networks:
|
||||
- portfolio
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_HOST: ${DB_HOST}
|
||||
POSTGRES_PORT: ${DB_PORT}
|
||||
volumes:
|
||||
- pg_date:/var/lib/postgresql/data
|
||||
Reference in New Issue
Block a user