diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index cd880da..8e6621b 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -8,6 +8,7 @@ services: front: build: . + restart: unless-stopped ports: - 80 networks: @@ -18,3 +19,30 @@ services: - 'traefik.docker.network=traefik' - 'traefik.frontend.rule=Host:fantus.studio' - 'traefik.port=80' + + mysql: + image: mysql:5.7 + restart: unless-stopped + env_file: .directus + ports: + - 3306 + volumes: + - ./data/db:/var/lib/mysql + + directus: + image: directus/directus:v8-apache + restart: unless-stopped + env_file: .directus + volumes: + - ./data/config:/var/directus/config + - ./data/uploads:/var/directus/public/uploads + - ./custom.ini:/usr/local/etc/php/conf.d/custom.ini + networks: + - traefik + - default + labels: + - "traefik.enable=true" + - "traefik.port=80" + - "traefik.docker.network=traefik" + - "traefik.backend=fantus-api" + - "traefik.frontend.rule=Host:api.fantus.studio" diff --git a/pages/sets.tsx b/pages/sets.tsx index 962bc29..2e54134 100644 --- a/pages/sets.tsx +++ b/pages/sets.tsx @@ -1,24 +1,29 @@ -import React from 'react' +import React, { useState, useEffect } from 'react' +import { NextPage } from 'next' +import axios from 'axios' + +const Home: NextPage = () => { + + const [links, setLinks] = useState([] as string[]) + + useEffect(() => { + axios.get('https://api.fantus.studio/directus/items/mixes?status=published') + .then(({ data }) => { + setLinks(data.data.map((entry: any) => entry.link)) + }) + }, []) -const Home = () => { return

sets

collection of some sets made here and there.