mirror of
https://github.com/Faridik/Carolyn.git
synced 2026-07-08 05:11:52 +00:00
Created folder for Spreadsheet service
This commit is contained in:
parent
91155a1415
commit
e23ad4463c
26
.dockerignore
Normal file
26
.dockerignore
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
**/__pycache__
|
||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
README.md
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.vscode
|
||||||
24
SpreadsheetsService/Dockerfile
Normal file
24
SpreadsheetsService/Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# For more information, please refer to https://aka.ms/vscode-docker-python
|
||||||
|
FROM python:3.8-slim-buster
|
||||||
|
|
||||||
|
# Keeps Python from generating .pyc files in the container
|
||||||
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
|
# Turns off buffering for easier container logging
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
# Install pip requirements
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN python -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
ADD . /app
|
||||||
|
|
||||||
|
# Не работает, права не знаю как дать больше, аппюзер ограничен
|
||||||
|
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
||||||
|
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
|
||||||
|
# RUN useradd appuser && chown -R appuser /app
|
||||||
|
# USER appuser
|
||||||
|
|
||||||
|
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
|
||||||
|
CMD ["python", "app.py"]
|
||||||
6
SpreadsheetsService/app.py
Normal file
6
SpreadsheetsService/app.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import pathlib
|
||||||
|
import os
|
||||||
|
|
||||||
|
f = open("/app/file.txt", "a")
|
||||||
|
f.write("We wrote some text")
|
||||||
|
f.close()
|
||||||
1
SpreadsheetsService/file.txt
Normal file
1
SpreadsheetsService/file.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
We wrote some textWe wrote some text
|
||||||
0
SpreadsheetsService/requirements.txt
Normal file
0
SpreadsheetsService/requirements.txt
Normal file
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
spreadsheets:
|
||||||
|
container_name: "carolyn-spreadsheets"
|
||||||
|
build: ./SpreadsheetsService
|
||||||
|
environment:
|
||||||
|
SECRETKEY: "HELLO-WORLD-@21XX 15AF"
|
||||||
|
volumes:
|
||||||
|
- ./SpreadsheetsService:/app:Z
|
||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
# To ensure app dependencies are ported from your virtual environment/host machine into your container, run 'pip freeze > requirements.txt' in the terminal to overwrite this file
|
||||||
Loading…
x
Reference in New Issue
Block a user