Skip to content

Commit 71ac999

Browse files
author
Darren Govoni
committed
Updates
1 parent 31b8509 commit 71ac999

File tree

3 files changed

+49
-25
lines changed

3 files changed

+49
-25
lines changed

Dockerfile

+32-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
# creates the CLI container
1+
FROM python:3.12
2+
3+
RUN apt-get update
4+
5+
WORKDIR /opt/pyfi
6+
7+
ENV TZ=America/New_York
8+
9+
ADD requirements.txt /opt/pyfi/requirements.txt
10+
ADD setup.py /opt/pyfi/setup.py
11+
ADD README.md /opt/pyfi/README.md
12+
ADD conf/pyfi.ini /opt/pyfi/pyfi.ini
13+
ADD conf/pyfi.ini /root/pyfi.ini
14+
ADD conf/pyfi.ini /home/pyfi/pyfi.ini
15+
ADD pyfi.polar /root/pyfi.polar
16+
17+
RUN pip3 install virtualenv
18+
19+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
20+
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
21+
22+
RUN useradd pyfi -d /home/pyfi
23+
RUN chown -R pyfi /opt/pyfi /home/pyfi
24+
RUN virtualenv --python=python3 venv
25+
RUN venv/bin/python -m pip install --upgrade pip
26+
RUN venv/bin/pip uninstall -y setuptools
27+
RUN venv/bin/pip install setuptools==59.1.1
28+
#RUN venv/bin/pip install --upgrade flask
29+
RUN venv/bin/pip install -r requirements.txt
30+
RUN venv/bin/pip uninstall -y pytz
31+
RUN venv/bin/python setup.py install
32+

Makefile

+8-24
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,19 @@
1-
.DEFAULT_GOAL := all
2-
3-
.PHONY: format
4-
format:
5-
eslint --fix "src/**/*.{js,vue}"
61

7-
.PHONY: lint
8-
lint:
9-
eslint "src/**/*.{js,vue}"
2+
.DEFAULT_GOAL := all
103

114
.PHONY: clean
125
clean:
136
@echo "Cleaning"
7+
docker ps -a|grep -v CONTAINER|awk '{ print "docker stop "$1}'| true | sh 2> /dev/null
8+
docker ps -a|grep -v CONTAINER|awk '{ print "docker rm "$1}'| true | sh 2> /dev/null
149

15-
.PHONY: docs
16-
docs:
17-
make -C docs html
10+
.PHONY: up
11+
up:
12+
docker compose up
1813

1914
.PHONY: build
2015
build:
21-
. venv/bin/activate && ( \
22-
python setup.py install ; \
23-
)
24-
25-
.PHONY: install
26-
install:
27-
. venv/bin/activate && ( \
28-
pip install -r requirements.txt ; \
29-
python setup.py install ; \
30-
python setup.py clean \
31-
)
16+
docker buildx bake
3217

3318
.PHONY: all
34-
all: clean lint format build
35-
git status
19+
all: clean build

docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3.9'
2+
3+
services:
4+
5+
cli:
6+
image: elasticcode.ai/cli:local
7+
container_name: cli
8+
build:
9+
context: .

0 commit comments

Comments
 (0)