services: recipe-frontend: build: context: ./frontend dockerfile: Dockerfile container_name: recipe-frontend restart: unless-stopped environment: NEXT_PUBLIC_API_URL: "http://recipe-api:8080" # env_file: # - .env networks: - proxy - recipe-internal recipe-api: build: context: ./backend dockerfile: Dockerfile image: recipe-api:local container_name: recipe-api restart: unless-stopped environment: DATABASE_URL: "mysql://root:${MARIADB_ROOT_PASSWORD}@recipe-db:3306/${MARIADB_DATABASE}" depends_on: - recipe-db networks: - proxy - recipe-internal recipe-db: image: mariadb:11 container_name: recipe-db restart: unless-stopped # env_file: # - .env environment: MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD} MARIADB_DATABASE: ${MARIADB_DATABASE} MARIADB_USER: ${MARIADB_USER} MARIADB_PASSWORD: ${MARIADB_PASSWORD} volumes: - recipe_db_data:/var/lib/mysql - ./db/init:/docker-entrypoint-initdb.d command: > --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci networks: - recipe-internal volumes: recipe_db_data: networks: proxy: external: true recipe-internal: driver: bridge