Skip to content

Commit dab3cdc

Browse files
authored
Merge pull request #30 from bugout-dev/docker-init
Docker init
2 parents 93477f3 + eb6c707 commit dab3cdc

14 files changed

Lines changed: 539 additions & 35 deletions

.dockerignore

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/vim,visualstudiocode,linux,python
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,visualstudiocode,linux,python
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### Python ###
20+
# Byte-compiled / optimized / DLL files
21+
__pycache__/
22+
*.py[cod]
23+
*$py.class
24+
25+
# C extensions
26+
*.so
27+
28+
# Distribution / packaging
29+
.Python
30+
build/
31+
develop-eggs/
32+
dist/
33+
downloads/
34+
eggs/
35+
.eggs/
36+
lib/
37+
lib64/
38+
parts/
39+
sdist/
40+
var/
41+
wheels/
42+
pip-wheel-metadata/
43+
share/python-wheels/
44+
*.egg-info/
45+
.installed.cfg
46+
*.egg
47+
MANIFEST
48+
49+
# PyInstaller
50+
# Usually these files are written by a python script from a template
51+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
52+
*.manifest
53+
*.spec
54+
55+
# Installer logs
56+
pip-log.txt
57+
pip-delete-this-directory.txt
58+
59+
# Unit test / coverage reports
60+
htmlcov/
61+
.tox/
62+
.nox/
63+
.coverage
64+
.coverage.*
65+
.cache
66+
nosetests.xml
67+
coverage.xml
68+
*.cover
69+
*.py,cover
70+
.hypothesis/
71+
.pytest_cache/
72+
73+
# Translations
74+
*.mo
75+
*.pot
76+
77+
# Django stuff:
78+
*.log
79+
local_settings.py
80+
db.sqlite3
81+
db.sqlite3-journal
82+
83+
# Flask stuff:
84+
instance/
85+
.webassets-cache
86+
87+
# Scrapy stuff:
88+
.scrapy
89+
90+
# Sphinx documentation
91+
docs/_build/
92+
93+
# PyBuilder
94+
target/
95+
96+
# Jupyter Notebook
97+
.ipynb_checkpoints
98+
99+
# IPython
100+
profile_default/
101+
ipython_config.py
102+
103+
# pyenv
104+
.python-version
105+
106+
# pipenv
107+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
108+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
109+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
110+
# install all needed dependencies.
111+
#Pipfile.lock
112+
113+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
114+
__pypackages__/
115+
116+
# Celery stuff
117+
celerybeat-schedule
118+
celerybeat.pid
119+
120+
# SageMath parsed files
121+
*.sage.py
122+
123+
# Environments
124+
.env
125+
.venv
126+
env/
127+
venv/
128+
ENV/
129+
env.bak/
130+
venv.bak/
131+
132+
# Spyder project settings
133+
.spyderproject
134+
.spyproject
135+
136+
# Rope project settings
137+
.ropeproject
138+
139+
# mkdocs documentation
140+
/site
141+
142+
# mypy
143+
.mypy_cache/
144+
.dmypy.json
145+
dmypy.json
146+
147+
# Pyre type checker
148+
.pyre/
149+
150+
# pytype static type analyzer
151+
.pytype/
152+
153+
### Vim ###
154+
# Swap
155+
[._]*.s[a-v][a-z]
156+
!*.svg # comment out if you don't need vector files
157+
[._]*.sw[a-p]
158+
[._]s[a-rt-v][a-z]
159+
[._]ss[a-gi-z]
160+
[._]sw[a-p]
161+
162+
# Session
163+
Session.vim
164+
Sessionx.vim
165+
166+
# Temporary
167+
.netrwhist
168+
# Auto-generated tag files
169+
tags
170+
# Persistent undo
171+
[._]*.un~
172+
173+
### VisualStudioCode ###
174+
.vscode/*
175+
!.vscode/settings.json
176+
!.vscode/tasks.json
177+
!.vscode/launch.json
178+
!.vscode/extensions.json
179+
*.code-workspace
180+
181+
### Pycharm ###
182+
.idea
183+
184+
### VisualStudioCode Patch ###
185+
# Ignore all local history of files
186+
.history
187+
188+
# End of https://www.toptal.com/developers/gitignore/api/vim,visualstudiocode,linux,python
189+
190+
### VSCode ###
191+
.vscode
192+
193+
# Git
194+
.git
195+
.github
196+
197+
# Envionments
198+
.brood
199+
.venv
200+
.env
201+
202+
# Environment variables
203+
test.env
204+
dev.env
205+
prod.env
206+
207+
configs/test.env
208+
configs/dev.env
209+
configs/prod.env
210+
configs/brood.env
211+
configs/docker.env
212+
configs/docker.dev.env
213+
configs/docker.test.env
214+
configs/docker.prod.env
215+
216+
.secrets/
217+
218+
# Alembic migrations
219+
configs/alembic.test.ini
220+
configs/alembic.dev.ini
221+
configs/alembic.prod.ini
222+
223+
Dockerfile
224+
docker-compose.yml

.gitignore

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Created by https://www.toptal.com/developers/gitignore/api/vim,visualstudiocode,linux,python
32
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,visualstudiocode,linux,python
43

@@ -191,13 +190,27 @@ tags
191190
### VSCode ###
192191
.vscode
193192

194-
# Envionment
193+
# Envionments
194+
.brood/
195+
.venv/
196+
.env/
197+
198+
# Environment variables
195199
dev.env
196200
test.env
197201
prod.env
198-
.secrets
199-
.brood/
202+
brood.env
203+
docker.env
204+
docker.dev.env
205+
docker.test.dev
206+
docker.prod.env
207+
docker.brood.env
208+
209+
.secrets/
210+
211+
# Alembic migrations
200212
alembic.test.ini
201213
alembic.dev.ini
202214
alembic.prod.ini
203-
.secrets/
215+
alembic.brood.ini
216+
alembic.docker.ini

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM python:3.8-slim-buster
2+
3+
# Update packages and
4+
# prepare alembic for docker compose setup
5+
RUN apt-get update && \
6+
apt-get install -y libpq-dev jq && \
7+
rm -rf /var/lib/apt/lists/* && \
8+
pip3 install --no-cache-dir --upgrade pip setuptools && \
9+
pip3 install --no-cache-dir psycopg2-binary alembic
10+
11+
WORKDIR /usr/src/brood
12+
13+
COPY . /usr/src/brood
14+
15+
# Install Brood API application
16+
RUN pip3 install --no-cache-dir -e .
17+
18+
EXPOSE 7474
19+
20+
ENTRYPOINT ["./dev.sh"]

0 commit comments

Comments
 (0)