Created folder for Spreadsheet service

This commit is contained in:
Serafim Urukov 2021-07-21 23:53:07 +03:00
parent 91155a1415
commit e23ad4463c
8 changed files with 69 additions and 0 deletions

26
.dockerignore Normal file
View 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
View File

@ -0,0 +1 @@
.vscode

View 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"]

View File

@ -0,0 +1,6 @@
import pathlib
import os
f = open("/app/file.txt", "a")
f.write("We wrote some text")
f.close()

View File

@ -0,0 +1 @@
We wrote some textWe wrote some text

View File

10
docker-compose.yml Normal file
View 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
View 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