Skip to content

Commit 4016929

Browse files
committed
Initial commit
0 parents  commit 4016929

File tree

217 files changed

+19340
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+19340
-0
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Get rid of .venv when copying
2+
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
3+
*/.venv
4+
*/*/.venv

.env_example

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
DOMAIN=localhost
2+
# DOMAIN=local.dockertoolbox.tiangolo.com
3+
# DOMAIN=localhost.tiangolo.com
4+
# DOMAIN=dev.example.com
5+
6+
STACK_NAME=example-com
7+
8+
TRAEFIK_PUBLIC_NETWORK=traefik-public
9+
TRAEFIK_TAG=example.com
10+
TRAEFIK_PUBLIC_TAG=traefik-public
11+
12+
DOCKER_IMAGE_BACKEND=backend
13+
DOCKER_IMAGE_CELERYWORKER=celeryworker
14+
DOCKER_IMAGE_FRONTEND=frontend
15+
16+
# Backend
17+
BACKEND_APP_MODULE=app.main:app
18+
BACKEND_CORS_ORIGINS=["http://localhost", "http://localhost:4200", "http://localhost:3000", "http://localhost:8080", "https://localhost", "https://localhost:4200", "https://localhost:3000", "https://localhost:8080", "http://dev.example.com", "https://stag.example.com", "https://example.com", "http://local.dockertoolbox.tiangolo.com", "http://localhost.tiangolo.com"]
19+
BACKEND_PRE_START_PATH=/app/prestart.sh
20+
PROJECT_NAME=example
21+
SECRET_KEY=changethis
22+
TOTP_SECRET_KEY=changethis
23+
FIRST_SUPERUSER=admin@example.com
24+
FIRST_SUPERUSER_PASSWORD=changethis
25+
SMTP_TLS=True
26+
SMTP_PORT=587
27+
SMTP_HOST=mail.example.com
28+
SMTP_USER=bot@example.com
29+
SMTP_PASSWORD=changethis
30+
EMAILS_FROM_EMAIL=bot@example.com
31+
EMAILS_FROM_NAME=Botty McBotface
32+
EMAILS_TO_EMAIL=admin@example.com
33+
34+
USERS_OPEN_REGISTRATION=True
35+
36+
SENTRY_DSN=
37+
38+
# Flower
39+
FLOWER_BASIC_AUTH=admin:changethis
40+
41+
# Postgres
42+
POSTGRES_SERVER=db
43+
POSTGRES_USER=postgres
44+
POSTGRES_PASSWORD=changethis
45+
POSTGRES_DB=app
46+
47+
# PgAdmin
48+
PGADMIN_LISTEN_PORT=5050
49+
PGADMIN_DEFAULT_EMAIL=admin@example.com
50+
PGADMIN_DEFAULT_PASSWORD=changethis
51+
52+
# Neo4j
53+
NEO4J_SERVER=neo4j
54+
NEO4J_USERNAME=neo4j
55+
NEO4J_PASSWORD=changethis
56+
NEO4J_AUTH=neo4j:changethis
57+
NEO4J_BOLT=bolt

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.vscode
2+
.mypy_cache
3+
docker-stack.yml
4+
*.txt
5+
.env
6+
*.code-workspace
7+
.s3cfg
8+
cookiecutter-config-file.yml

.gitlab-ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
image: tiangolo/docker-with-compose
2+
3+
before_script:
4+
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
5+
- pip install docker-auto-labels
6+
7+
stages:
8+
- test
9+
- build
10+
- deploy
11+
12+
tests:
13+
stage: test
14+
script:
15+
- sh ./scripts/test.sh
16+
tags:
17+
- build
18+
- test
19+
20+
build-stag:
21+
stage: build
22+
script:
23+
- TAG=stag FRONTEND_ENV=staging sh ./scripts/build-push.sh
24+
only:
25+
- master
26+
tags:
27+
- build
28+
- test
29+
30+
build-prod:
31+
stage: build
32+
script:
33+
- TAG=prod FRONTEND_ENV=production sh ./scripts/build-push.sh
34+
only:
35+
- production
36+
tags:
37+
- build
38+
- test
39+
40+
deploy-stag:
41+
stage: deploy
42+
script:
43+
- >
44+
DOMAIN=stag.whyqd.com
45+
TRAEFIK_TAG=stag.whyqd.com
46+
STACK_NAME=stag-whyqd-com
47+
TAG=stag
48+
sh ./scripts/deploy.sh
49+
environment:
50+
name: staging
51+
url: https://stag.whyqd.com
52+
only:
53+
- master
54+
tags:
55+
- swarm
56+
- stag
57+
58+
deploy-prod:
59+
stage: deploy
60+
script:
61+
- >
62+
DOMAIN=whyqd.com
63+
TRAEFIK_TAG=whyqd.com
64+
STACK_NAME=whyqd-com
65+
TAG=prod
66+
sh ./scripts/deploy.sh
67+
environment:
68+
name: production
69+
url: https://whyqd.com
70+
only:
71+
- production
72+
tags:
73+
- swarm
74+
- prod

0 commit comments

Comments
 (0)