Skip to content

Commit

Permalink
Merge pull request #237 from OpenHistoricalMap/staging
Browse files Browse the repository at this point in the history
Staging updates to Production
  • Loading branch information
Ruben L. Mendoza authored Oct 26, 2023
2 parents d4cbcc3 + 7be80d6 commit aeb3356
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ That said, there are times when we have published feature branches to `staging`

## More details on process for changing, testing, and deploying

This is what the process of making changes to openhistocialmap.org looks like:
This is what the process of making changes to openhistoricalmap.org looks like:

1. Based on `staging`, make a feature-branch at `ohm-website` like `newinspector-stack` or `map-style-202101` or similar.
2. Running the `ohm-website` locally, make and test your changes locally in that feature branch. You can and should push work-in-progeress changes to your feature branch on github.com, so we can all see what's happening if needed. But don't commit directly to `staging` on `ohm-website`.
3. When your changes are working as desired, submit a PR from your feature branches into staging. Assign Dan, Sanjay, or Sajjad to review that PR. We can merge into `staging` and then update the commit hash on the staging brnach of this repo, here https://github.com/OpenHistoricalMap/ohm-deploy/blob/staging/images/web/Dockerfile#L119-L121
2. Running the `ohm-website` locally, make and test your changes locally in that feature branch. You can and should push work-in-progress changes to your feature branch on github.com, so we can all see what's happening if needed. But don't commit directly to `staging` on `ohm-website`.
3. When your changes are working as desired, submit a PR from your feature branches into staging. Assign Dan, Sanjay, or Sajjad to review that PR. We can merge into `staging` and then update the commit hash on the staging branch of this repo, here https://github.com/OpenHistoricalMap/ohm-deploy/blob/staging/images/web/Dockerfile#L119-L121
4. When we do that and push here, that kicks off a Github Actions automated deploy that will make your changes live on https://staging.openhistoricalmap.org.
5. Test on Staging. This is when we can review with folks who are not running locally, share with the community, etc.
6. When we're all happy with the code on Staging, we go back to `ohm-website` repo and make a PR of `staging` into `production` and then update the commit hash on the `main` branch in this OHM-deploy repo, which then kicks off deploy to production to make changes live on https://openhistoricalmap.org.
6. When we're all happy with the code on Staging, we go back to `ohm-website` repo and make a PR of `staging` into `production` and then update the commit hash on the `main` branch in this OHM-deploy repo, which then kicks off deploy to production to make changes live on https://openhistoricalmap.org.
16 changes: 9 additions & 7 deletions images/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV workdir /var/www

# Production OSM setup
ENV RAILS_ENV=production

# Install the openstreetmap-website dependencies
RUN apt-get update \
RUN apt-get update \
&& apt-get install -y \
ruby2.7 libruby2.7 ruby2.7-dev libmagickwand-dev libxml2-dev libxslt1-dev \
apache2 apache2-dev build-essential git-core firefox-geckodriver postgresql-client \
ruby ruby-dev ruby-bundler libmagickwand-dev libxml2-dev libxslt1-dev \
apache2 apache2-dev build-essential git-core postgresql-client \
libpq-dev libsasl2-dev imagemagick libffi-dev libgd-dev libarchive-dev libbz2-dev curl \
default-jre-headless file gpg-agent libvips-dev locales software-properties-common tzdata unzip \
advancecomp gifsicle libjpeg-progs jhead jpegoptim optipng pngcrush pngquant \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -22,7 +24,7 @@ RUN apt-get update && apt-get install -y nodejs yarn && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install openstreetmap-cgimap requiriments
# Install openstreetmap-cgimap requirements
RUN apt-get update && apt-get -y install libpqxx-dev libfcgi-dev zlib1g-dev \
libboost-dev libboost-program-options-dev libfmt-dev \
libmemcached-dev libcrypto++-dev libargon2-dev libyajl-dev \
Expand All @@ -46,13 +48,13 @@ RUN npm install -g svgo

# Install openstreetmap-website
RUN rm -rf $workdir/html
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=284909db296078187f0338149bc9e7667e5a01c9
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=9bf3c73f71b6749fff63095f15e6efb8dd978af3
RUN git clone -b staging https://github.com/OpenHistoricalMap/ohm-website.git $workdir
WORKDIR $workdir
RUN git checkout $OPENHISTORICALMAP_WEBSITE_GITSHA

# change the echo here with a reason for changing the commithash
RUN echo 'get id.html.erb from upstream'
RUN echo 'update locale files with latest translations'
RUN git fetch

# Install Ruby packages
Expand Down
2 changes: 1 addition & 1 deletion ohm/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: osm-seed
version: '0.1.0-n783.ha5dabc8'
version: '0.1.0-n794.h5b6149a'
repository: https://devseed.com/osm-seed-chart/
2 changes: 0 additions & 2 deletions values.production.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ osm-seed:
minReplicas: 2
maxReplicas: 10
cpuUtilization: 80
cgimap:
enabled: false
# ====================================================================================================
# Variables for memcached. Memcached is used to store session cookies
# ====================================================================================================
Expand Down
7 changes: 5 additions & 2 deletions values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ osm-seed:
minReplicas: 2
maxReplicas: 10
cpuUtilization: 80
cgimap:
enabled: true
# ====================================================================================================
# Variables for memcached. Memcached is used to store session cookies
# ====================================================================================================
Expand Down Expand Up @@ -732,6 +730,11 @@ osm-seed:
DJANGO_ROOT: /app
DJANGO_SETTINGS_MODULE: config.settings.local
C_FORCE_ROOT: "False"
REACT_APP_OSM_URL: https://staging.openhistoricalmap.org
REACT_APP_OSM_API: https://staging.openhistoricalmap.org/api/0.6
REACT_APP_OVERPASS_BASE: https://overpass-api-staging.openhistoricalmap.org/api/interpreter
REACT_APP_NOMINATIM_URL: https://nominatim-api-staging.openhistoricalmap.org
OSMCHA_URL: https://osmcha-staging.openhistoricalmap.org
resources:
enabled: false
requests:
Expand Down

0 comments on commit aeb3356

Please sign in to comment.