Files
social-media/deploy/compose.yml

66 lines
2.0 KiB
YAML

services:
db:
image: postgres:16
restart: unless-stopped
env_file:
- path: /etc/socialize/socialize.env
- path: .deploy.env
required: false
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 20
networks:
- internal
api:
image: git.mapachotes.com/jbourdon/socialize-api:${SOCIALIZE_IMAGE_TAG}
restart: unless-stopped
env_file:
- path: /etc/socialize/socialize.env
- path: .deploy.env
required: false
environment:
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT}
ASPNETCORE_URLS: ${ASPNETCORE_URLS}
ConnectionStrings__PostgresConnection: Host=${POSTGRES_HOST};Port=${POSTGRES_PORT};Database=${POSTGRES_DB};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD}
Website__FrontendBaseUrl: ${WEBSITE_FRONTEND_BASE_URL}
Emailer__ApiKey: ${RESEND_API_KEY}
Emailer__FromEmail: ${RESEND_FROM_EMAIL}
Authentication__Jwt__Issuer: ${JWT_ISSUER}
Authentication__Jwt__Audience: ${JWT_AUDIENCE}
Authentication__Jwt__Key: ${JWT_SIGNING_KEY}
Authentication__Jwt__Lifetime: ${JWT_LIFETIME}
Authentication__Jwt__RefreshTokenLifetime: ${JWT_REFRESH_TOKEN_LIFETIME}
ReleaseCommunications__Repository__RepositoryUrl: ${GIT_REPOSITORY_URL}
ReleaseCommunications__Repository__AccessToken: ${GIT_REPOSITORY_TOKEN}
depends_on:
db:
condition: service_healthy
volumes:
- ./blob-storage:/app/App_Data/blob-storage
expose:
- "8080"
networks:
- internal
web:
image: git.mapachotes.com/jbourdon/socialize-web:${SOCIALIZE_IMAGE_TAG}
restart: unless-stopped
depends_on:
- api
ports:
- "127.0.0.1:8080:80"
networks:
- internal
networks:
internal: