Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify setup of localdev #70

Merged
merged 6 commits into from Feb 9, 2018

Conversation

Projects
None yet
3 participants
@butlerx
Copy link
Member

commented Dec 9, 2017

remove testdata
remove remove need for docker-entrypoints

@butlerx butlerx force-pushed the butlerx:simple branch 3 times, most recently from ff5b05b to 336f21b Dec 9, 2017

butlerx added some commits Oct 11, 2017

simplfy docker
remove testdata scripts

@butlerx butlerx force-pushed the butlerx:simple branch 4 times, most recently from dc07916 to bb60181 Dec 13, 2017

ADD setup_zen.sh /docker-entrypoint-initdb.d/10-setup_zen.sh
FROM postgres:9-alpine
LABEL maintainer="butlerx <cian@coderdojo.org>"
COPY dumps /db

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 20, 2017

Contributor

Why using a copy over a volume?
Copy means you'll cp a 2.5G file in your image, while a volume is a symlink-link ?

This comment has been minimized.

Copy link
@butlerx

butlerx Dec 20, 2017

Author Member

had issues with permissions of the dumps that why the next line chownes them

UPDATE cd_agreements SET full_name='Namey McNameFace', ip_address='127.0.0.1';

\c cp-dojos-development
UPDATE cd_dojoleads SET application = jsonb_set(application::jsonb, '{championDetails, email}'::text[], ('"testmail+user' || user_id || '@example.com"')::jsonb);

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 20, 2017

Contributor

ChampionDetails doesn't exists anymore
You need "champion", and "venue" at least

This comment has been minimized.

Copy link
@butlerx

butlerx Dec 20, 2017

Author Member

so what those the data look like?

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 22, 2017

Contributor

Will commit to fix, it's easier than dumping a json schema

#!/usr/bin/env sh

set -e

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 20, 2017

Contributor

Add comment about usage : drop tar.gz in /db that will be copied/mounted

volumes:
- ./workspace-zen/cp-translations:/usr/src/cp-translations:Z
- ./workspace-zen/cp-translations:/usr/src/app/node_modules/cp-translations:Z

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 20, 2017

Contributor

isn't that hte role of the image to ln -s over to node_module?
https://github.com/CoderDojo/cp-zen-frontend/blob/master/docker-entrypoint.sh#L11

This comment has been minimized.

Copy link
@butlerx

butlerx Dec 20, 2017

Author Member

this replaces that and works more reliably than a symlink

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 20, 2017

Contributor

then create yourself a ticket to replace the one in the repos, elsewhat both will be done

This comment has been minimized.

Copy link
@butlerx

butlerx Dec 20, 2017

Author Member

no this doesnt run the ln script
i was goign to remove the ln scripts once this was merged

volumes:
- ./workspace-zen/cp-translations:/usr/src/cp-translations:Z
- ./workspace-zen/cp-translations:/usr/src/app/node_modules/cp-translations:Z

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 20, 2017

Contributor

same as upper ^

for repo in "${repos[@]}"; do
cd $folder/"$repo" || (echo "Couldn't access $folder/$repo" && exit)
git pull
git fetch origin

This comment has been minimized.

Copy link
@Wardormeur

Wardormeur Dec 20, 2017

Contributor

fetch doesn't update/reset the current branch, it's fairly different from pull

This comment has been minimized.

Copy link
@butlerx

butlerx Dec 20, 2017

Author Member

yes but if you do a pull in a forloop you could end up with a lot of merge conflicts

@Wardormeur Wardormeur self-assigned this Dec 22, 2017

@DanielBrierton DanielBrierton merged commit ed0a89c into CoderDojo:master Feb 9, 2018

@butlerx butlerx deleted the butlerx:simple branch Feb 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.