services: user: container_name: user build: context: ./user dockerfile: Dockerfile args: USER_SERVICE_NAME: ${USER_SERVICE_NAME} DJANGO_SUPERUSER_USERNAME: ${DJANGO_SUPERUSER_USERNAME} DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL} DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD} env_file: - .env expose: - "8003" volumes: - user:/home/archive/${USER_SERVICE_NAME} - media_volume:/home/archive/user_auth_system/media tty: true networks: - archive init: true depends_on: - db_archive restart: on-failure chat: container_name: chat build: context: ./chat dockerfile: Dockerfile args: CHAT_SERVICE_NAME: ${CHAT_SERVICE_NAME} env_file: - .env expose: - "8004" volumes: - user:/home/archive/${USER_SERVICE_NAME} tty: true networks: - archive init: true depends_on: - user - db_archive restart: on-failure nginx: container_name: nginx depends_on: - user - chat build: context: ./nginx dockerfile: Dockerfile ports: - "443:443" - "80:80" volumes: - media_volume:/home/archive/user_auth_system/media networks: - archive env_file: .env restart: on-failure db_archive: container_name: db_archive build: context: ./db_archive/docker dockerfile: Dockerfile environment: POSTGRES_DB: ${DB_ARCHIVE_NAME} POSTGRES_USER: ${DB_ARCHIVE_USER} POSTGRES_PASSWORD: ${DB_ARCHIVE_PASSWORD} PGPORT: ${DB_ARCHIVE_PORT} volumes: - db_archive:/var/lib/postgresql/data/ expose: - "5434" tty: true networks: - archive init: true restart: on-failure volumes: user: db_archive: driver: local driver_opts: type: "none" o: "bind" device: "${PWD}/db_archive/db" media_volume: driver: local driver_opts: type: "none" o: "bind" device: "${PWD}/db_archive/profile_pictures" networks: archive: driver: bridge