Skip to content

Commit 1399be6

Browse files
authored
feat(py3): Add Python 3 support via SENTRY_PYTHON3 env variable (#702)
1 parent a9a8b2f commit 1399be6

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ env:
1212
DOCKER_COMPOSE_VERSION: 1.24.1
1313
jobs:
1414
test:
15+
strategy:
16+
matrix:
17+
py3: ['', '1']
1518
runs-on: ubuntu-18.04
16-
name: "test"
19+
name: "test${{ matrix.py3 == '1' && ' PY3' || ''}}"
1720
steps:
1821
- name: Pin docker-compose
1922
run: |
@@ -28,6 +31,7 @@ jobs:
2831
- name: Install and test
2932
env:
3033
COMPOSE_PARALLEL_LIMIT: 10
34+
SENTRY_PYTHON3: ${{ matrix.py3 }}
3135
run: |
3236
./install.sh
3337
./test.sh

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Official bootstrap for running your own [Sentry](https://sentry.io/) with [Docke
1515

1616
To get started with all the defaults, simply clone the repo and run `./install.sh` in your local check-out.
1717

18+
_If you like trying out new things, you can run `SENTRY_PYTHON3=1 ./install.sh` instead to use our brand new Python 3 images. **Keep in mind that Python 3 support is experimental at this point**_
19+
1820
During the install, a prompt will ask if you want to create a user account. If you require that the install not be blocked by the prompt, run `./install.sh --no-user-prompt`.
1921

2022
There may need to be modifications to the included example config files (`sentry/config.example.yml` and `sentry/sentry.conf.example.py`) to accommodate your needs or your environment (such as adding GitHub credentials). If you want to perform these, do them before you run the install script and copy them without the `.example` extensions in the name (such as `sentry/sentry.conf.py`) before running the `install.sh` script.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ x-sentry-defaults: &sentry_defaults
77
context: ./sentry
88
args:
99
- SENTRY_IMAGE
10+
- SENTRY_PYTHON3
1011
image: sentry-onpremise-local
1112
depends_on:
1213
- redis
@@ -60,7 +61,6 @@ services:
6061
nofile:
6162
soft: 10032
6263
hard: 10032
63-
6464
postgres:
6565
<< : *restart_policy
6666
image: 'postgres:9.6'

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ echo ""
207207
$dc pull -q --ignore-pull-failures 2>&1 | grep -v -- -onpremise-local || true
208208

209209
# We may not have the set image on the repo (local images) so allow fails
210-
docker pull $SENTRY_IMAGE || true;
210+
docker pull ${SENTRY_IMAGE}${SENTRY_PYTHON3:+-py3} || true;
211211

212212
echo ""
213213
echo "Building and tagging Docker images..."

sentry/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG SENTRY_IMAGE
2-
FROM ${SENTRY_IMAGE}
2+
ARG SENTRY_PYTHON3
3+
FROM ${SENTRY_IMAGE}${SENTRY_PYTHON3:+-py3}
34

45
COPY . /usr/src/sentry
56

0 commit comments

Comments
 (0)