update dockerfiles and compose prod

This commit is contained in:
kusz committed 2024-11-28 10:47:56 +01:00
1 parent b7cb8e026e
commit 86ec2ab34c
7 files changed
+141 -62

No files matched your search

+45 -28
View File
@@ -1,65 +1,82 @@
version: "3.2"
services:
version: '3.8'
services:
db:
env_file:
- .env
image: postgres:11
restart: unless-stopped
env_file:
- .env
volumes:
- ./db:/var/lib/postgresql/data
networks:
- internal-network
pgadmin:
env_file:
- .env
image: dpage/pgadmin4
volumes:
- ./pgadmin:/var/lib/pgadmin
restart: unless-stopped
depends_on:
- db
networks:
- internal-network
# pgadmin:
# image: dpage/pgadmin4
# restart: unless-stopped
# env_file:
# - .env
# depends_on:
# - db
# ports:
# - "5050:80"
# networks:
# - internal-network
backend:
build:
context: ./evg-outbo-api
dockerfile: api.Dockerfile
image: outbo_backend:latest
restart: unless-stopped
env_file:
- .env
image: "${COMPOSE_BACKEND_IMAGE}"
restart: unless-stopped
depends_on:
- db
volumes:
- ./evg-outbo-api:/code
networks:
- internal-network
- external-network
command: >
bash -c "
python manage.py migrate &&
python manage.py collectstatic --noinput &&
gunicorn --bind 0.0.0.0:8000 outbo.wsgi:application
"
frontend:
build:
context: ./evg-outbo-web
dockerfile: web.Dockerfile
image: outbo_frontend:latest
restart: unless-stopped
env_file:
- .env
image: "${COMPOSE_FRONTEND_IMAGE}"
restart: unless-stopped
depends_on:
- backend
volumes:
- ./evg-outbo-web:/usr/share/nginx/html
ports:
- "3000:3000"
networks:
- internal-network
server:
env_file:
- .env
image: "abiosoft/caddy"
image: abiosoft/caddy
restart: unless-stopped
volumes:
volumes:
- ./Caddyfile:/etc/Caddyfile
- ./.caddy:/root/.caddy
ports:
- 80:80
- 443:443
- "80:80"
- "443:443"
networks:
- internal-network
- external-network
networks:
internal-network:
internal: true
external-network:
driver: bridge
external-network:
external: true