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