-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c00c95d
commit bb21e70
Showing
9 changed files
with
103 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM python:latest | ||
WORKDIR /home/plakplaats | ||
|
||
# Install build dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
libpq-dev gcc | ||
RUN rm -rf /var/lib/apt/lists/* | ||
|
||
# Install required python packages | ||
COPY requirements.txt ./ | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
|
||
# Copy over remaining files | ||
COPY . . | ||
|
||
# Document which ports will be used | ||
EXPOSE 3000 | ||
|
||
# Give a warm welcome | ||
ENV SHELL="/bin/bash" | ||
RUN echo "echo 'You are in the plakplaats devcontainer!'" >> /etc/bash.bashrc | ||
RUN echo "echo 'Start the server with: python src/server.py'" >> /etc/bash.bashrc | ||
|
||
# Do not run anything, but do not close the container either | ||
CMD ["tail", "-f", "/dev/null"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile | ||
{ | ||
"name": "Plakplaats devcontainer", | ||
"workspaceFolder": "/home/plakplaats", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "website-dev", | ||
"forwardPorts": [3000], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} | ||
}, | ||
"runServices": ["website-dev"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Inherit but overwrite production configs with development configs | ||
|
||
include: | ||
- path: ../docker-compose.yml | ||
|
||
services: | ||
website-dev: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile.website | ||
ports: | ||
- "3000:3000" | ||
depends_on: | ||
- postgres_db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,6 @@ | ||
.env | ||
|
||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/usage.statistics.xml | ||
.idea/**/dictionaries | ||
.idea/**/shelf | ||
|
||
# AWS User-specific | ||
.idea/**/aws.xml | ||
|
||
# Generated files | ||
.idea/**/contentModel.xml | ||
|
||
# Sensitive or high-churn files | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# Gradle and Maven with auto-import | ||
# When using Gradle or Maven with auto-import, you should exclude module files, | ||
# since they will be recreated, and may cause churn. Uncomment if using | ||
# auto-import. | ||
# .idea/artifacts | ||
# .idea/compiler.xml | ||
# .idea/jarRepositories.xml | ||
# .idea/modules.xml | ||
# .idea/*.iml | ||
# .idea/modules | ||
# *.iml | ||
# *.ipr | ||
|
||
# CMake | ||
cmake-build-*/ | ||
|
||
# Mongo Explorer plugin | ||
.idea/**/mongoSettings.xml | ||
|
||
# File-based project format | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# SonarLint plugin | ||
.idea/sonarlint/ | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# Editor-based Rest Client | ||
.idea/httpRequests | ||
|
||
# Android studio 3.1+ serialized cache file | ||
.idea/caches/build_file_checksums.ser | ||
|
||
# .NET | ||
obj/ | ||
bin/ | ||
|
||
# Ignore user uploads | ||
uploads/ | ||
|
||
__pycache__ | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM python:alpine | ||
WORKDIR /home/plakplaats | ||
|
||
# Install build dependencies | ||
RUN apk add --no-cache postgresql-libs | ||
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev | ||
|
||
# Copy the files responsible for listing dependencies | ||
COPY requirements.txt ./ | ||
|
||
# Cache the python dependencies | ||
RUN python3 -m pip install -r requirements.txt --no-cache-dir | ||
|
||
# Remove previously installed build dependencies, they are not needed anymore | ||
RUN apk del .build-deps | ||
|
||
# Copy the source code | ||
COPY src src | ||
|
||
EXPOSE 3000 | ||
CMD ["python", "src/server.py"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
services: | ||
website: | ||
build: | ||
dockerfile: Dockerfile.website | ||
ports: | ||
- "3000:3000" | ||
depends_on: | ||
- postgres_db | ||
|
||
postgres_db: | ||
image: postgres:latest | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: plakplaats-db | ||
ports: | ||
- "5432:5432" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
flask | ||
waitress | ||
requests | ||
psycopg2 | ||
python-dotenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters