setup potato for traefik.
This commit is contained in:
@@ -6,5 +6,5 @@ COPY requirements.txt requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 5000
|
||||
CMD ["flask", "--app", "./src/main", "run", "--host=0.0.0.0"]
|
||||
|
||||
58
potato.yaml
58
potato.yaml
@@ -1,37 +1,43 @@
|
||||
services:
|
||||
|
||||
proxy:
|
||||
container_name: traefik
|
||||
image: traefik
|
||||
web:
|
||||
build: ./foundry-manager
|
||||
command: ["npm", "run", "dev"]
|
||||
ports:
|
||||
- 5173:5173
|
||||
- 8080:8080
|
||||
develop:
|
||||
watch:
|
||||
- action: sync
|
||||
path: ./foundry-manager/src
|
||||
target: /app/src
|
||||
- action: rebuild
|
||||
path: ./foundry-manager/package.json
|
||||
- action: rebuild
|
||||
path: ./foundry-manager/Dockerfile
|
||||
- action: restart
|
||||
path: compose.yaml
|
||||
api:
|
||||
build: ./server
|
||||
command: ["flask", "--app", "./src/main", "--debug", "run", "--host=0.0.0.0"]
|
||||
command: --providers.docker
|
||||
ports:
|
||||
- 5000:5000
|
||||
- 80:80
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
web:
|
||||
build: ./fmanager
|
||||
command: ["npm", "run", "dev"]
|
||||
develop:
|
||||
watch:
|
||||
- action: sync
|
||||
path: ./server/src
|
||||
path: ./fmanager/src
|
||||
target: /app/src
|
||||
- action: rebuild
|
||||
path: ./server/requirements.txt
|
||||
path: ./fmanager/package.json
|
||||
- action: rebuild
|
||||
path: ./server/Dockerfile
|
||||
path: ./fmanager/Dockerfile
|
||||
- action: restart
|
||||
path: ./fmanager/compose.yaml
|
||||
labels:
|
||||
traefik.http.routers.client.rule: "Host(`localhost`)"
|
||||
|
||||
api:
|
||||
build: ./foundry-manager-api
|
||||
command: ["flask", "--app", "./src/main", "--debug", "run", "--host=0.0.0.0"]
|
||||
develop:
|
||||
watch:
|
||||
- action: sync
|
||||
path: ./foundry-manager-api/src
|
||||
target: /app/src
|
||||
- action: rebuild
|
||||
path: ./server/compose.yaml
|
||||
path: ./foundry-manager-api/requirements.txt
|
||||
- action: rebuild
|
||||
path: ./foundry-manager-api/Dockerfile
|
||||
- action: rebuild
|
||||
path: ./foundry-manager-api/compose.yaml
|
||||
labels:
|
||||
traefik.http.routers.api.rule: "Host(`localhost`) && PathPrefix(`/api`)"
|
||||
|
||||
@@ -5,9 +5,10 @@ app = Flask(__name__)
|
||||
@app.route("/api/active_tables")
|
||||
def hello():
|
||||
return jsonify([{
|
||||
"a": 1,
|
||||
"b": "b",
|
||||
"potato": "potato"
|
||||
"id": 1,
|
||||
"table_name": "b",
|
||||
"table_link": "potato",
|
||||
"active": False
|
||||
}])
|
||||
|
||||
@app.route("/api/tables")
|
||||
|
||||
Reference in New Issue
Block a user