name: 'project_name' services: app: build: context: .. dockerfile: .devcontainer/Dockerfile volumes: - ../..:/workspaces:cached command: sleep infinity depends_on: - mysql # See note about network below networks: - dev-network # I'm using MySQL but this could easily be Postgres. # If you wanted SQLite you can do that inside the Dockerfile # itself, just `RUN apt update && apt install -y sqlite` # no need to have a separate container running here mysql: image: mysql:8 restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: 128collective MYSQL_USER: user MYSQL_PASSWORD: password ports: - "3306:3306" networks: - dev-network # If you don't have MySQL or Postgres running then you can remove # this network setup networks: dev-network: driver: bridge