This message was deleted.
# general
s
This message was deleted.
b
hey, is your
docker-compose.yml
not using Dockerfiles? are you able to share your docker-compose file?
v
sure
Copy code
version: '3.7'

services:
  nestjs:
    container_name: ${NESTJS_CONTAINER_NAME:?err}
    build:
      context: .
      target: production
    volumes:
      - .:/usr/src/app
      - /usr/src/app/node_modules
    networks:
      - neshanet
    depends_on:
      - mysql
      - redis
      - apache-stretch
  redis:
    image: redis:5
    container_name: ${REDIS_CONTAINER_NAME:?err}
    command: redis-server --requirepass ${REDIS_PASSWORD:?err}
    volumes:
      - ${REDIS_VOLUME}:/var/lib/redis
    networks:
      - neshanet
  apache-stretch:
    build:
      context: .
      target: apache-php
    container_name: ${PHP_CONTAINER_NAME:?err}
    depends_on:
      - mysql
    networks:
      - neshanet
    volumes:
      - ./legacy_code/php:/var/www/html
  mysql:
    image: mysql:latest
    command: --default-authentication-plugin=mysql_native_password
    container_name: ${MYSQL_CONTAINER_NAME:?err}
    environment:
      MYSQL_PASSWORD: ${TYPEORM_PASSWORD}
      MYSQL_ROOT_PASSWORD: ${TYPEORM_PASSWORD}
      MYSQL_DATABASE: ${TYPEORM_DATABASE}
    volumes:
      - ${MYSQL_VOLUME_PATH}:/var/lib/mysql2
      - ./legacy_code/database/mysqlconf:/etc/mysql/conf.d
      - ./legacy_code/database/dump:/docker-entrypoint-initdb.d
    networks:
      - neshanet
networks:
  neshanet:
It uses my docker file, but the problem is for example with the MYSQL where I need to pass some files. In order to make it work should I create a Dockerfile only for
mysql
and use
COPY
and then use Pulumi to build it
?
b
I usually build my image with a
Dockerfile
, & push it to ECR before ever running pulumi. Then my pulumi app controls whatever task definitions, ASGs, services, etc. that will pull that existing image.
b
yeah this looks like an issue more along the lines of understanding docker volumes, there are a few ways to do this with ECS, you could ECS, attach an EBS volumes. I would have a search around the best way to do it
another consideration is moving your mysql into RDS and not using ECS